-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[241120] POM에 맞춰서 파일 이동 및 홈페이지 카드 테스트 추가
- Loading branch information
Showing
10 changed files
with
43 additions
and
14 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from web.Pages.base_page import BasePage | ||
from selenium.webdriver.common.by import By | ||
|
||
|
||
class HomePage(BasePage): | ||
def __init__(self, driver): | ||
super().__init__(driver) | ||
self.logo_locator = (By.CLASS_NAME, "logo") | ||
self.card_slider_parent_xpath = ( | ||
'//*[@id="root"]/main/div[2]/div[1]/div[1]/div/div[1]/div[1]' | ||
) | ||
|
||
def verify_logo_present(self): | ||
logo = self.get_element(self.logo_locator) | ||
return logo is not None | ||
|
||
def get_slide_card_count(self): | ||
slide_cards = self.driver.find_elements( | ||
By.XPATH, f"{self.card_slider_parent_xpath}/*" | ||
) | ||
return len(slide_cards) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from web.TestBase.base_test import BaseTest | ||
from web.Pages.home_page import HomePage | ||
|
||
|
||
class MainTest(BaseTest): | ||
def test_visit_kbl_homepage(self): | ||
self.driver.get("https://kbl.or.kr/") | ||
home_page = HomePage(self.driver) | ||
|
||
self.assertTrue( | ||
home_page.verify_logo_present(), "홈페이지 로고가 보이지 않습니다." | ||
) | ||
|
||
slide_card_count = home_page.get_slide_card_count() | ||
self.assertEqual( | ||
slide_card_count, | ||
13, | ||
f"슬라이드 카드의 개수는 10개가 아닙니다. 현재 개수: {slide_card_count}", | ||
) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.