Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions fastfive-auto-app-dev/pages/lounge_page.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
from selenium.webdriver.common.by import By
from .base_page import BasePage


class LoungePage(BasePage):
ANDROID = {
'lounge_tab': (By.XPATH, '//*[@content-desc="라운지" or @text="라운지"]'),
'tab_benefit': (By.XPATH, '//*[@text="베네핏"]'),
'tab_community': (By.XPATH, '//*[@text="커뮤니티"]'),
'tab_event': (By.XPATH, '//*[@text="이벤트"]'),
}

IOS = {
'lounge_tab': (By.XPATH, '//XCUIElementTypeButton[contains(@label, "라운지")]'),
'tab_benefit': (By.XPATH, '//XCUIElementTypeOther[@name="베네핏"]'),
'tab_community': (By.XPATH, '//XCUIElementTypeOther[@name="커뮤니티"]'),
'tab_event': (By.XPATH, '//XCUIElementTypeOther[@name="이벤트"]'),
}

def get_selector(self, key):
return self.ANDROID[key] if self.is_android() else self.IOS[key]

def go_to_lounge_tab(self):
self.click(self.get_selector('lounge_tab'))
print("라운지 탭 클릭")
self.wait_seconds(2)

def _click_top_tab(self, key, name):
if self.is_ios():
element = self.find_element(self.get_selector(key))
element.click()
else:
self.click(self.get_selector(key))
print(f"{name} 탭 클릭")
self.wait_seconds(2)

def click_benefit_tab(self):
self._click_top_tab('tab_benefit', '베네핏')

def click_community_tab(self):
self._click_top_tab('tab_community', '커뮤니티')

def click_event_tab(self):
self._click_top_tab('tab_event', '이벤트')

def full_lounge_flow(self):
self.go_to_lounge_tab()
self.click_benefit_tab()
self.swipe_up()
self.wait_seconds(1)
self.click_community_tab()
self.swipe_up()
self.wait_seconds(1)
self.click_event_tab()
self.swipe_up()
self.wait_seconds(1)
self.click_benefit_tab()
print("✅ 라운지 탭 테스트 완료")
return True