mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
simulate javascript keyboard
This commit is contained in:
parent
1e167bc1df
commit
382b092bc9
1 changed files with 3 additions and 1 deletions
|
|
@ -70,7 +70,9 @@ try:
|
|||
|
||||
select_combobox = safe_get_element(DRIVER, By.XPATH, "//input[@data-combobox='']")
|
||||
assert isinstance(select_combobox, WebElement), "Combobox is not a WebElement"
|
||||
select_combobox.send_keys("no plugin matching normally")
|
||||
# Test simulate keyboard from js
|
||||
DRIVER.execute_script("arguments[0].value = 'no plugin matching normally' ", select_combobox)
|
||||
DRIVER.execute_script("arguments[0].dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));", select_combobox)
|
||||
|
||||
# All tabs should be hidden
|
||||
total_tabs = DRIVER.execute_script("""return document?.querySelector('[data-tab-select-dropdown]')?.querySelectorAll('[data-tab-select-handler]').length""")
|
||||
|
|
|
|||
Loading…
Reference in a new issue