Use mouse click as a backup way to place focus in tests.
The Captured Sites Automation Framework interacts with real-world pages. Some test actions, such as triggering autofill or typing password, require the automation to place focus on page elements. The framework currently invokes JavaScript's 'HtmlElement.focus()' method to place focus on an element. However, it came to my attention that this method occasionally fail on some test machines. This change introduces mouse left click as a backup way to place focus on an element, if JavaScript fails. Fixed focus function in Capture Sites Test Framework. The Captured Sites Test Framework uses JavaScript's .focus function to place focus on a html element. This apparently fails from time to time on some machines. This fix adds a left mouse click action to the element if focus via script fails. Bug: 847905 Change-Id: Idef08ac1e9adb225889d5da35d8f426bf4663f3e Reviewed-on: https://chromium-review.googlesource.com/c/1332716Reviewed-by:Sebastien Seguin-Gagnon <sebsg@chromium.org> Commit-Queue: Yiming Zhou <uwyiming@google.com> Cr-Commit-Position: refs/heads/master@{#608058}
Showing
Please register or sign in to comment