03-26-2012, 09:37 PM
Thx Rajeevszone,
When I do an OSpy, I find
Browser("Wisdom").Page("WisdomMain").WebElement("**Account 12345678 is invalid or you are not authorized to view this account.**")
The 12345678 changes depending on which account was entered. From the OR Manager the element does highlight when I I do a View-> Highlight in App.
If I go back and try the same exact code that just found the WebElement that earlier worked; now using
Browser("Wisdom").Page("WisdomMain").WebElement("Account 12345678 is").Highlight, the WebElement is not found in the OR.
I then tried:
ACCT1 = 12345678
WebElement("innertext:=" & "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**") but this code did not work.
I then went into the OR and changed the innertext to read "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.** and selected a RegEx, no luck in finding the webelement.
Then I tried yours replacing Expected Text = Expected Text with "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**"
t o read:
If colWebElements(iCnt).GetROProperty("innertext") = "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**" Then
and
If colWebElements(iCnt).GetROProperty("innertext") = "**Account 12345678 is invalid or you are not authorized to view this account.**" Then
with a General run error ion the line.
Any other thoughtful suggestions?
thx
Lor
When I do an OSpy, I find
Browser("Wisdom").Page("WisdomMain").WebElement("**Account 12345678 is invalid or you are not authorized to view this account.**")
The 12345678 changes depending on which account was entered. From the OR Manager the element does highlight when I I do a View-> Highlight in App.
If I go back and try the same exact code that just found the WebElement that earlier worked; now using
Browser("Wisdom").Page("WisdomMain").WebElement("Account 12345678 is").Highlight, the WebElement is not found in the OR.
I then tried:
ACCT1 = 12345678
WebElement("innertext:=" & "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**") but this code did not work.
I then went into the OR and changed the innertext to read "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.** and selected a RegEx, no luck in finding the webelement.
Then I tried yours replacing Expected Text = Expected Text with "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**"
t o read:
If colWebElements(iCnt).GetROProperty("innertext") = "**Account " & ACCT1 & " is invalid or you are not authorized to view this account.**" Then
and
If colWebElements(iCnt).GetROProperty("innertext") = "**Account 12345678 is invalid or you are not authorized to view this account.**" Then
with a General run error ion the line.
Any other thoughtful suggestions?
thx
Lor