Posted By: Anonymous
I have the following HTML:
<button name="btnG" class="gbqfb" aria-label="Google Search" id="gbqfb"><span class="gbqfi"></span></button>
My following code for clicking “Google Search” button is working well using Java in WebDriver.
onclick event of your element invokes
window.alert(), you may find your Selenium code hanging, depending on the implementation of the browser driver. That said, you can use the
You should also note that you might be better off using the
click() method of the