Reputation: 197
I would like to click a button on google.com. But it show Element '//input[@name="btnI"]' not visible after 5 seconds.
. Does anyone know how to do it?
I also tried to input search string first and click button, it work well.
*** Settings ***
Documentation Robot Framework Example
Library SeleniumLibrary
Library OperatingSystem
Suite Setup Open Browser https://www.google.com/ chrome
Suite Teardown Close Browser
*** Variables ***
*** Test Cases ***
My Test
Search Web
*** Keywords ***
Click Doodle Button
[Documentation] Click button
Wait Until Element Is Visible //input[@name="btnI"]
Click Element //input[@name="btnI"]
Search Web
[Documentation] Search Web
Click Doodle Button
Upvotes: 0
Views: 509
Reputation: 19929
Wait Until Element Is Visible (//input[@name="btnI"])[2]
Click Element (//input[@name="btnI"])[2]
Therre are two elements the correct element is second one , use above locator
Upvotes: 1