You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
execute_javascript ignores *args, so scripts that use arguments[0] fail #536
Where:core_helpers/selenium_action_objects.py, execute_javascript(self, js_script, *args) (line 375 on the default branch, 13c4604)
What happens: the method takes *args but calls self.driver.execute_script(js_script) without them. Any script that reads arguments[0] (for example, scrolling to or clicking a located element) gets undefined. The error is caught, logged as critical, and the method returns False.
Steps:
In a page object, locate an element: el = self.get_element(locator).
Expected: the element scrolls into view, and the method returns True. Actual: a JavaScript error (Cannot read properties of undefined), logged as critical, and the method returns False.
Related: the method returns only a pass/fail flag, so callers can't get the script's return value (e.g. return document.title). That may be intended. Mentioning it in case it isn't.
Found while writing automation with the framework.
Activity