I am doing some testing in Selenium IDE and I can´t seem to get past this else-if statement. (I only work in IDE, do not have access t WebDriver) I need my Selenium to check a list and see if the sorting is set on 'descending', if not it should click on the label to make it so. This is what I tried:
<tr>
<td>storeElementPresent</td>
<td>//th[@aria-sort='descending']</td>
<td>check</td>
</tr>
<tr>
<td>echo</td>
<td>${check}</td>
<td></td>
</tr>
<tr>
<td>gotoIf</td>
<td>${check}== 'false'</td>
<td>sortDescending</td>
</tr>
<tr>
<td>label</td>
<td>sortDescending</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//label[text()='Sort List']</td>
<td></td>
</tr>
My problem is that even when my 'check' variable is evaluated to true it still executes the click and changes it to ascending. What is wrong in my code? I also tried it this way
storeEval | if (selenium.isElementPresent("//th[@aria-sort='descending']") == true){'verifySort’} else if (selenium.isElementPresent("//th[@aria-sort='descending']") == false) { ‘makeDescending’}
But I get this error : [error] Threw an exception: missing ; before statement
Does anyone know what I am doing wrong?
Aucun commentaire:
Enregistrer un commentaire