Skip to content

Commit 43547a5

Browse files
handled error : 'WebElement' object has no attribute 'find_element_by_tag_name'
1 parent 1643678 commit 43547a5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cumulusci/robotframework/pageobjects/BasePageObjects.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def select_rows(self, *items):
7575
elements = self.selenium.get_webelements(xpath)
7676
if elements:
7777
for element in elements:
78-
cb = element.find_element_by_tag_name("input")
78+
cb = element.find_element(By.TAG_NAME, "input")
7979
if not cb.is_selected():
8080
element.click()
8181
else:
@@ -105,7 +105,7 @@ def deselect_rows(self, *items):
105105

106106
if elements:
107107
for element in elements:
108-
cb = element.find_element_by_tag_name("input")
108+
cb = element.find_element(By.TAG_NAME, "input")
109109
if cb.is_selected():
110110
self.builtin.log(f"clicking on element for {item}")
111111
element.click()
@@ -255,7 +255,7 @@ def _get_form_element_for_label(self, label):
255255
"""
256256
# search from the root of the document, unless a modal
257257
# is open
258-
root = self.selenium.driver.find_element_by_tag_name("body")
258+
root = self.selenium.driver.find_element(By.TAG_NAME, "body")
259259
with self._no_implicit_wait():
260260
# We don't want to wait, we just want to know if the
261261
# modal is alredy there or not. The caller should have

0 commit comments

Comments
 (0)