From e1c201cd20a13f49c1128adf735e28268d086a0a Mon Sep 17 00:00:00 2001 From: jonghyeokFF Date: Wed, 6 May 2026 23:30:38 +0900 Subject: [PATCH] =?UTF-8?q?feat(my-account):=20=EB=82=B4=20=EA=B3=84?= =?UTF-8?q?=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 내 계정 탭 진입, 프로필 편집, 회원탈퇴 흐름 구현 Co-Authored-By: Claude Sonnet 4.6 --- .../pages/my_account_page.py | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 fastfive-auto-app-dev/pages/my_account_page.py diff --git a/fastfive-auto-app-dev/pages/my_account_page.py b/fastfive-auto-app-dev/pages/my_account_page.py new file mode 100644 index 0000000..4f2223a --- /dev/null +++ b/fastfive-auto-app-dev/pages/my_account_page.py @@ -0,0 +1,62 @@ +from selenium.webdriver.common.by import By +from .base_page import BasePage + + +class MyAccountPage(BasePage): + ANDROID = { + 'my_account_tab': (By.XPATH, '//*[@content-desc="내 계정" or @text="내 계정"]'), + 'edit_profile_btn': (By.XPATH, '//*[@content-desc="편집" or @content-desc="프로필 편집"]'), + 'withdraw_btn': (By.XPATH, '//*[@text="회원 탈퇴"]'), + 'withdraw_checkbox': (By.XPATH, '//*[contains(@content-desc, "회원탈퇴 유의")]'), + 'confirm_btn': (By.XPATH, '//*[@text="탈퇴하기"]'), + } + + IOS = { + 'my_account_tab': (By.XPATH, '//XCUIElementTypeButton[contains(@label, "내 계정")]'), + 'edit_profile_btn': (By.XPATH, '//XCUIElementTypeButton[contains(@label, "편집")]'), + 'withdraw_btn': (By.XPATH, '//XCUIElementTypeOther[@name="회원 탈퇴"]'), + 'withdraw_checkbox': (By.XPATH, '//XCUIElementTypeOther[@name="WithdrawalCheckBox"]'), + 'confirm_btn': (By.XPATH, '//XCUIElementTypeOther[@name="탈퇴하기"]'), + } + + def get_selector(self, key): + return self.ANDROID[key] if self.is_android() else self.IOS[key] + + def go_to_my_account_tab(self): + self.click(self.get_selector('my_account_tab')) + print("내 계정 탭 클릭") + self.wait_seconds(2) + + def click_edit_profile(self): + window = self.driver.get_window_size() + tap_x = int(window['width'] * 0.57) + tap_y = int(window['height'] * 0.18) + print(f"편집 버튼 탭 (x={tap_x}, y={tap_y})") + self.tap(tap_x, tap_y) + print("프로필 편집 아이콘 클릭") + self.wait_seconds(2) + + def click_withdraw(self): + if self.is_ios(): + # 페이지소스 기준 고정 좌표: x=327+27=354, y=776+5=781 (탭바 경계 위) + self.driver.execute_script('mobile: tap', {'x': 354, 'y': 781}) + else: + self.click(self.get_selector('withdraw_btn')) + print("회원탈퇴 클릭") + self.wait_seconds(2) + + def click_checkbox(self): + if self.is_android(): + with open("page_source_android_checkbox2.xml", "w", encoding="utf-8") as f: + f.write(self.driver.page_source) + self.click(self.get_selector('withdraw_checkbox')) + print("체크박스 선택") + self.wait_seconds(1) + + def full_withdraw_flow(self): + self.go_to_my_account_tab() + self.click_edit_profile() + self.click_withdraw() + self.click_checkbox() + print("✅ 회원탈퇴 테스트 완료") + return True