2
votes

I have just started using Selenium IDE and I am trying to open the Google search engine and type in a sum (example 5+7). This will open a result page with a calculator and the answer in it.

So far the test works but when I try to verify that the answer is correct I am getting an error even though it is. Basically I am highlighting the answer, right clicking on it and clicking verifyText. Similarly if I click on the text box holding the answer and choose verifyElementPresent I get an error as well.

Can someone please enlighten me on why I am getting these errors.

P.S I am new to Selenium so I would appreciate it if your answer is kept simple Thanks in advance :)

screenshot of code and google calculator

1
Can you include the code (test case) you currently have? Thanks. - alecxe
@alecxe Thank you for the interest. I added a screenshot with all the commands used and the google calculator. Thanks in advance - Jeremy Borg
What about xpath approach. Replace id=cwos with //span[@id="cwos"]. Does it help? - alecxe
I still get the error :/ - Jeremy Borg

1 Answers

3
votes

You are getting the error because of the latency time. Just add a waitForElementPresent keyword before validating the result.

It Workss...

Screenshot to show it worked for me

Happie learning. :)