Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
wrong code execution
#1
Code:
If Browser("name:= Welcome to Bugzilla").Page("title:=Welcome to Bugzilla").Link("test:=Log In","visible := true").Exist(10) then Call Fn_ParameterizeTest else Call fn_Logout End If

Whats wrong with this code? When always I try this code it goes to false condition if though condition is true.
Reply
#2
Try the below code:

Code:
If Browser("name:=Welcome to Bugzilla").Page("title:=Welcome to Bugzilla").Link("test:=Log In","visible:=true").Exist(10) then Call Fn_ParameterizeTest else Call fn_Logout End If

There should not be any extra spaces between property and Value.
Thanks,
SUpputuri
Reply
#3
Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.
Reply
#4
just check if the page is displayed or not first. If the page is displaying change the properties of the page and run it
Reply
#5
Hi,

As SUpputuri already suggested above, there are leading & trailing spaces in the property descriptions.
"name:= Welcome to Bugzilla" (it should be like "name:=Welcome to Bugzilla")
"visible := true". (it should be like "visible:=true")


Try as suggested above and see....
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Childobject return wrong checkbox count.. VpnQTP 1 3,315 04-09-2015, 09:07 PM
Last Post: babu123
  Wrong count for UsedRange rows and columns in datatable. qtpexpert 2 7,029 06-20-2012, 04:35 PM
Last Post: qtpexpert
  QTP gives wrong value through GetRoProperty rahul3tech 2 4,516 02-03-2012, 10:14 PM
Last Post: rajpes
  Count gives wrong result sudhirzpatil 2 2,653 05-28-2009, 03:51 PM
Last Post: sudhirzpatil
  Checking if an error message is generated on the page due to wrong data entry pkjakhar 1 3,335 06-19-2008, 01:47 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)