Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If/Exist statement
#1
Solved: 10 Years, 8 Months, 4 Weeks ago
I need to check if a webelement (Report Name) exists as it changes with each iteration.

I tried:
Code:
If Browser("Preferences").Page("Preferences").WebElement("crossreference").Exist(1)
…. In the OR I have regExp of webelement crossreference set to ReportName

and:
Code:
If Browser("Preferences").Page("Preferences").WebElement("innertext:="&ReportName”).Exist(1)
which i thought would work. But both get passed by.

Any ideas on how to better my If exists statement?
Reply
#2
Solved: 10 Years, 8 Months, 4 Weeks ago
HI,

Can you let us know what regular expression that you used in OR?

there is a small correction in the second method i.e. DP
Code:
If Browser("Preferences").Page("Preferences").WebElement("innertext:=" & ReportName).Exist
Thanks,
SUpputuri
Reply
#3
Solved: 10 Years, 8 Months, 4 Weeks ago
Supputuri,

Hi, thx for the info.

In my OR, I changed the webelement for crossreference innertext set to my variable ReportName (no quotes)

Sorry, I dont see any change in the code for:
Code:
If Browser("Preferences").Page("Preferences").WebElement("innertext:=" & ReportName).Exist

other than a space p-rior to &.

thx for your looking?
Reply
#4
Solved: 10 Years, 8 Months, 4 Weeks ago
I ended up using a different webelement to Exist off of and all is well now. Something is hookey with the crossreference. ;-)

thx for looking
(.) (.)
__>
~
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 2,710 04-24-2018, 02:12 PM
Last Post: Ankur
  Time Delay issue with Exist mv8167 11 23,960 06-19-2017, 02:56 PM
Last Post: grosorg
  Performance Issues Using '.Exist' AndyBSG 2 3,143 12-12-2014, 03:24 PM
Last Post: AndyBSG
  datatable column exist diya 3 12,173 12-11-2012, 11:24 AM
Last Post: elango87
  Check if exist not selected radiobutton sedin 6 7,431 09-12-2012, 12:55 PM
Last Post: sedin

Forum Jump:


Users browsing this thread: 1 Guest(s)