01-05-2011, 03:07 AM
Regular Expression will not be helpful here. It would match the webelement, but then be unable to output the correct checkpoint. Best option would be an if statement and use the Exists function
Hope this helps.
Code:
if Browser("Welcome: Mercury Tours").Page("Book a Flight:Mercury").WebElement("Business").Exists(5) then
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebElement("Business").Output CheckPoint("Business_3")
else if Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebElement("Business_2").Exists(5) then
Browser("Welcome: Mercury Tours").Page("Book a Flight: Mercury").WebElement("Business_2").Output CheckPoint("Business_4")
end if
Hope this helps.