Web Object recognition using innerHTML?
One of the AUTs we are testing doesn't use unique titles and using URLs is not ideal since a lot of pages look the same but have different URLs without common enough parts to them and sometimes URLs don't even get refreshed.
Is it possible to identify a page object using parts of innerHTML? I tried to configure the OR but nothing got captured when I learned the page and adding it manually didn't work for some reason?
Re: Web Object recognition using innerHTML?
Not exactly sure about your question, but I'll take a stab at it. I don't believe you can get the innerhtml from a page object.
Is there a WebElement or Link that would identify your page?
If I had a site of all countries, for example, could I identify Switzerland like this?
If Browser("micClass:=Browser").Page("micClass:=Page" ).WebElement("micClass:=WebElement", "innerhtml:=*Switzerland*").Exist(0)) then
Msgbox ("I am on Switzerland's Page")
(FYI... innertext might be easier)
Another piece of code that might help is
Tarun's code in this thread.