javascriptautomationrpag1ant

How to use selenium.waitforvalue command without javascript?


I haven't work on javascript but I do want to use waitforvalue command in chrome as I have done in internet explorer.

ie.waitforvalue script document.getElementsByClassName("footer").length expectedvalue 1

Is there any other format in which I can use selenium.waitforvalue command without using javascript?


Solution

  • Currently there is no possibility in G1ANT to use the selenium.waitforvalue or ie.waitforvalue commands without also using javascript.

    By the way your code can be improved. I guess that you want to just wait for the footer class elements to be loaded and not specifically check if the elements number is 1.

    This is how you can check if any elements of the footer class are loaded:

    selenium.waitforvalue script ‴return !!document.getElementsByClassName("footer").length > 0‴ expectedvalue true
    

    or if you're using the ie.waitforvalue command:

    ie.waitforvalue script ‴!!document.getElementsByClassName("footer").length > 0‴ expectedvalue true