Add RTM session and configurable token generator flow
This commit is contained in:
+9
-3
@@ -367,7 +367,7 @@ def type_into_field(driver, locator, value):
|
||||
field.send_keys(value)
|
||||
|
||||
|
||||
def select_bootstrap_dropdown_by_id(driver, element_id, value):
|
||||
def select_bootstrap_dropdown_by_id(driver, element_id, value, exact=False):
|
||||
|
||||
wait = WebDriverWait(driver, 20)
|
||||
|
||||
@@ -411,12 +411,18 @@ def select_bootstrap_dropdown_by_id(driver, element_id, value):
|
||||
search_box.clear()
|
||||
search_box.send_keys(value)
|
||||
|
||||
option_xpath = (
|
||||
f"//div[@id='{element_id}']//div[contains(@class,'ui-select-choices-row')]"
|
||||
f"[normalize-space()='{value}']"
|
||||
if exact else
|
||||
"//div[contains(@class,'ui-select-choices-row')]"
|
||||
f"//*[normalize-space()='{value}' or starts-with(normalize-space(),'{value}')]"
|
||||
)
|
||||
option = wait.until(
|
||||
EC.element_to_be_clickable(
|
||||
(
|
||||
By.XPATH,
|
||||
"//div[contains(@class,'ui-select-choices-row')]"
|
||||
f"//*[normalize-space()='{value}' or starts-with(normalize-space(),'{value}')]"
|
||||
option_xpath
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user