Clicking Element with JavaScript on Robot Framework
1 min readJun 5, 2019
Robot framework provides keyword called Execute JavaScript to execute JavaScript codes.
Below code will find the element with provided id value and click on it
Execute JavaScript document.getElementById(‘ID Value’).onclick()
Ex. Execute JavaScript document.getElementById(‘main-header’).onclick()
Below code will find the element with provided xpath value and click on it
Execute JavaScript document.evaluate(‘xpath…