-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Hi,
Fist: I want to thank you for your hard work on this lib, it is awesome.
Regarding the issue:
execute_script() should have an element option in order to run code on that specific element. For example if I want to highlight the element during execution for debugging purposes using the default execute_script I can but using elementium it is harder.
Sample code (context.driver is just the driver created in the before_feature of the behave script):
browser = SeElements(context.driver)
browser.navigate("https://www.toolsqa.com/automation-practice-form/").insist(lambda e: "Demo Form" in e.title())
first_name = browser.find("input[name='firstname']", wait=True, ttl=context.timeout)
first_name.write("First Name")
script = "arguments[0].style.border='5px solid #6bf442'"
se_first_name = context.driver.find_element_by_css_selector("input[name='firstname']")
context.driver.execute_script(script, se_first_name)
first_name.execute_script(script=script)
Looking into the implementation of execute_script in se.py it is called directly on self.browser
Metadata
Metadata
Assignees
Labels
No labels