[UPD] script selenium lib get_element_not_visible
This commit is contained in:
parent
7de033f389
commit
3153b985f7
1 changed files with 27 additions and 0 deletions
|
|
@ -164,6 +164,7 @@ class SeleniumLib(object):
|
|||
)
|
||||
)
|
||||
button.click()
|
||||
return button
|
||||
|
||||
def get_element(self, by: str = By.ID, value: str = None, timeout=5):
|
||||
wait = WebDriverWait(self.driver, timeout)
|
||||
|
|
@ -178,6 +179,32 @@ class SeleniumLib(object):
|
|||
|
||||
return ele[0]
|
||||
|
||||
def get_element_not_visible(self, by: str = By.ID, value: str = None, timeout=5):
|
||||
wait = WebDriverWait(self.driver, timeout)
|
||||
ele = wait.until(
|
||||
EC.presence_of_element_located(
|
||||
(
|
||||
by,
|
||||
value,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return ele
|
||||
|
||||
def get_elements_not_visible(self, by: str = By.ID, value: str = None, timeout=5):
|
||||
wait = WebDriverWait(self.driver, timeout)
|
||||
ele = wait.until(
|
||||
EC.presence_of_all_elements_located(
|
||||
(
|
||||
by,
|
||||
value,
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return ele
|
||||
|
||||
def get_all_element(self, by: str = By.ID, value: str = None, timeout=5):
|
||||
wait = WebDriverWait(self.driver, timeout)
|
||||
ele = wait.until(
|
||||
|
|
|
|||
Loading…
Reference in a new issue