forked from SvetlanaAQA/LumaProjectPython_2024_spring
-
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.
Merge pull request #39 from py-AQA/Visibility_of_data
sports wear items and username on each page
- Loading branch information
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
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
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
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,27 @@ | ||
import pytest | ||
from selene.support.conditions.have import values_containing, values | ||
from selenium.webdriver.common.by import By | ||
|
||
from pages.locators import PerformanceSportswear, BaseLocators | ||
from selene import browser, be, have, query | ||
from selene.support.shared.jquery_style import s, ss | ||
from selene.support.conditions import be, have | ||
|
||
|
||
def test_006_008_001_visibility_of_price_photo_name(): | ||
# I can't count elements on the page via selen | ||
browser.open(PerformanceSportswear.LINK_SPORT) | ||
ss(BaseLocators.PRODUCT_NAME).should(have.size(5)) | ||
ss(BaseLocators.PRODUCT_PRICE).should(have.size(5)) | ||
ss(BaseLocators.PRODUCT_IMAGE).should(have.size(5)) | ||
|
||
|
||
def test_006_008_001_visibility_of_price_photo_name_selenium(driver): | ||
# I have to find actual nr of elements on the page via python/selenium | ||
browser.open(PerformanceSportswear.LINK_SPORT) | ||
driver.get(PerformanceSportswear.LINK_SPORT) | ||
nr_of_items_on_page = len(driver.find_elements(By.CSS_SELECTOR, BaseLocators.PRODUCT_ITEM_IN_CATALOG)) | ||
ss(BaseLocators.PRODUCT_NAME).should(have.size(nr_of_items_on_page)) | ||
ss(BaseLocators.PRODUCT_PRICE).should(have.size(nr_of_items_on_page)) | ||
ss(BaseLocators.PRODUCT_IMAGE).should(have.size(nr_of_items_on_page)) | ||
|
File renamed without changes.