Skip to content

Commit eb95f9f

Browse files
committed
try to make python linter happy
1 parent fa44274 commit eb95f9f

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

py/test/selenium/webdriver/support/relative_by_tests.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ def test_should_be_able_to_find_elements_above_another_by_locator(driver, pages)
6363
def test_should_be_able_to_combine_filters(driver, pages):
6464
pages.load("relative_locators.html")
6565

66-
elements = driver.find_elements(with_tag_name("td")
66+
elements = driver.find_elements(
67+
with_tag_name("td")
6768
.above(driver.find_element(By.ID, "center"))
6869
.to_right_of(driver.find_element(By.ID, "top"))
6970
)
@@ -75,7 +76,9 @@ def test_should_be_able_to_combine_filters(driver, pages):
7576
def test_should_be_able_to_combine_filters_by_locator(driver, pages):
7677
pages.load("relative_locators.html")
7778

78-
elements = driver.find_elements(with_tag_name("td").above({By.ID: "center"}).to_right_of({By.ID: "top"}))
79+
elements = driver.find_elements(
80+
with_tag_name("td").above({By.ID: "center"}).to_right_of({By.ID: "top"})
81+
)
7982

8083
ids = [el.get_attribute("id") for el in elements]
8184
assert "topRight" in ids
@@ -84,7 +87,8 @@ def test_should_be_able_to_combine_filters_by_locator(driver, pages):
8487
def test_should_be_able_to_use_css_selectors(driver, pages):
8588
pages.load("relative_locators.html")
8689

87-
elements = driver.find_elements(locate_with(By.CSS_SELECTOR, "td")
90+
elements = driver.find_elements(
91+
locate_with(By.CSS_SELECTOR, "td")
8892
.above(driver.find_element(By.ID, "center"))
8993
.to_right_of(driver.find_element(By.ID, "top"))
9094
)
@@ -107,7 +111,8 @@ def test_should_be_able_to_use_css_selectors_by_locator(driver, pages):
107111
def test_should_be_able_to_use_xpath(driver, pages):
108112
pages.load("relative_locators.html")
109113

110-
elements = driver.find_elements(locate_with(By.XPATH, "//td[1]")
114+
elements = driver.find_elements(
115+
locate_with(By.XPATH, "//td[1]")
111116
.below(driver.find_element(By.ID, "top"))
112117
.above(driver.find_element(By.ID, "bottomLeft"))
113118
)
@@ -119,7 +124,9 @@ def test_should_be_able_to_use_xpath(driver, pages):
119124
def test_should_be_able_to_use_xpath_by_locator(driver, pages):
120125
pages.load("relative_locators.html")
121126

122-
elements = driver.find_elements(locate_with(By.XPATH, "//td[1]").below({By.ID: "top"}).above({By.ID: "bottomLeft"}))
127+
elements = driver.find_elements(
128+
locate_with(By.XPATH, "//td[1]").below({By.ID: "top"}).above({By.ID: "bottomLeft"})
129+
)
123130

124131
ids = [el.get_attribute("id") for el in elements]
125132
assert "left" in ids
@@ -128,7 +135,8 @@ def test_should_be_able_to_use_xpath_by_locator(driver, pages):
128135
def test_should_be_able_to_combine_straight_filters(driver, pages):
129136
pages.load("relative_locators.html")
130137

131-
elements = driver.find_elements(with_tag_name("td")
138+
elements = driver.find_elements(
139+
with_tag_name("td")
132140
.straightBelow(driver.find_element(By.ID, "topRight"))
133141
.straight_to_right_of(driver.find_element(By.ID, "bottomLeft"))
134142
)

0 commit comments

Comments
 (0)