I am writing an automation test script for our web application using Robot framework and Selenium2Library. One of my test case involves the following scenario.
I have to run a particular test case only if web page contains more than one div
tag with a similar id
!
Is there any specific keyword in robot framework to set the value of a variable as a count of html tags having same id's ?
Here is a similar html code am dealing with :
<div id="dashboard">
<span>........</span>
</div>
<div id="dashboard">
<span>........</span>
</div>
I have to store the total number of div tag's with id=dashboard
in a variable ${Count}
.
Along with that , can we make use of Comparison/Relational operators directly in Robotframework test scipt ? i.e , can I write a test case similar to this :
Run Keyword If ${Count} > 1 Found More Elements
Can you please help me to resolve this issue ?