Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

I had written a Selenium command via IDE by implementing gotoIf when the statement is true it jumps to the label but while the statement if false it is not going to the desired label

I have attached the command and log as well can someone help me with it. enter image description here

1 Answer

0 votes
by (62.9k points)

You just need to make sure the code you want to execute if "home" is found is inside your gotoIf statement. It should look like below

 

gotoIf | ${test}==true | A

click | css=a.aits-log-out

label | A

Remove label | B as your gotoIf statement isn't looking for that label because you haven't defined it.

Code to copy paste if you want that as well

<tr>

    <td>gotoIf</td>

  

  <td>${test} == true</td>

    <td>A</td>

</tr>

<tr>

    <td>click</td>

    <td>css=a.aits-log-out</td>

    <td></td>

</tr>

<tr>

    <td>label</td>

    <td>A</td>

    <td></td>

</tr>

Browse Categories

...