Parama Sivam
Parama Sivam

Reputation: 117

How to use Execute Javascript keyword in robot framework for clicking an element

I need to click a button whose xpath is "//input[contains(@value,'Export to Excel')]" through Execute Javascript keyword. I don't know how to use it.

Can anyone help me out!!!

Upvotes: 1

Views: 4779

Answers (2)

Parama Sivam
Parama Sivam

Reputation: 117

The solution I found out for this problem is I have reloaded the page after executing the AutoIT script, then I was able to execute the remaining code.

Upvotes: 0

Krishna Kokila
Krishna Kokila

Reputation: 134

You can write it as below

Execute JavaScript    document.evaluate("ur xpath",document.body,null,9,null).singleNodeValue.click();

Upvotes: 3

Related Questions