Hi Community,
Question regarding how to use web page data in an If…else condition.
I enter data into a web page. When I press enter, it will either
- Say no records found
- Give me a list to search through and select one
- Take me to a data entry page where I can input data
Depending on which of these results appears, I would like to continue along a UI Path.
I have used UI Explorer to get unique target selector details from each web page.
IF 1 - Message
webctrl aaname=‘No matching values were found.’ tag=‘SPAN’ class=‘PSSRCHINSTRUCTIONS’ parentclass=‘PSSRCHPAGE’
If 2 - List
webctrl aaname=‘Search Results’ tag=‘SPAN’ class=‘PSSRCHSUBTITLE’ parentclass=‘PSSRCHPAGE’
If 3 - Data Entry
webctrl aaname=‘Transcript Text’ tag=‘LABEL’ class=‘PAPAGETITLE’ parentclass=‘PSPAGECONTAINER’
I’m trying to create if statements to say
If 1
Do X
Else
If 2
Do Y
Else
If 3
Do Z
Else
Error Message
End
End
End
The If statement in UI Path requires a VB Expression.
Am I able to say If aaname=“Search Results” somehow. I’m unsure of VB code so do not know where to start. What VB expression to use.
Thanks in advance,
Peter
*** Edited to enable webctrl details to appear.