Inspecting the web page
<span jsslot="">
<button class="LkLjZd ScJHi IfEcue HPiPcc KXT7c" jsaction="click:yTqzwd" jsname="HxVe9c" autofocus="">Click Here</button>
</span>
I am trying to interact with the element by using Execute Javascript. Here is my attempt
Execute JavaScript document.evaluate("//button[contains(text(),'Click Here')]",document.body,null,9,null).singleNodeValue.click()
Although the test passes, there is no visible action on the web page. It remains unchanged. Can anyone assist?
I have figured out the solution. Since there are multiple iframes, I need to select the correct iframe before running the command like so
Select Frame xpath=//*[@id="obj"]/div[5]/iframe
Execute JavaScript document.evaluate("//button[contains(text(),'Click Here')]",document.body,null,9,null).singleNodeValue.click()