I have 2 pages in my website. In the first page I enter some data say “name” and click on save button. A message appears as “Saved Successfully”. Now I navigate to the second page where the name I entered in the first page is visible here. I want to know whether the name appeared in the second page using QTP. I was able to find the text within the same page but need help to find a text in other page. The text I am looking for is not a link. It’s a simple text.
The following is the code I used to search within the same page for a text
If Browser("Login"). Page("User List_2").WebElement("innertext:=pqr").Exist Then
Msgbox "Text found"
Msgbox "Text not found"
Hi tired by providing the adding a second name/value pair for the WebElement but got the following error
“Object does not support this property or method”. I added the page objects into the repository.
To be more clear about my scenario:
My application has 2 values to inserted. 1) CPT 2) ICD. I can enter any one of them. Once I enter say ICD a message appears as “saved successfully”. Now in the next page I have 2 tables one for ICD and the other for CPT. Which ever I enter in the first page gets displayed in the app table in the second page. I need to check whether the text I entered in the first page (ICD or CPT) appeared in the next page in the app tables.