TestProject Forum

Get text of one page and compare with text on another page

How to Get text of one page and compare with text of another page?

We have list of medicines written on one page and I want to capture the text of first medicine and want to compare that text with text mentioned on its next page?
Android Mobile testing

Hello @tanvi.lohakare
You can get the text of the element in one page, and save it in a parameter.
Then in the continuation of the test, when you reach the 2nd page, get the Text using the Get Text action on the 2nd desired element, and then, in the step, you have an option to add a validation.
Inside the validation, compare it with the previous taken text from the first page.

How to save the get text element in parameter?

You click here
Create the paramter, and use it.

Then the text will be saved inside that parameter.

Not able to do it.Please tell me the steps…after clicking on Select Parameter how the text would be saved?
What if values are changing then how to save it?

Another potential solution might be to use the following plugin:
Image Comparison

Image Comparison might be suitable if you just want to detect a change in the list elements (against a base line).
If parsing the text values in the lists matters - then using parameters as explained above is a better approach