Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Close Tab Recognizes GetROProperty. WHY???
#1
Not Solved
Code:
MsgBox Browser("Username Dropdown").Page("Impersonate User").WebElement("UserName").GetROProperty("name")
- This displays result as UserName

Code:
Browser("Username Dropdown").Page("Impersonate User").WebElement("Cancel").Click
- we Closed the window here

Code:
MsgBox Browser("Username Dropdown").Page("Impersonate User").WebElement("UserName").GetROProperty("name")
- This also displays the name even after the modal window is closed.

Why is QTP doing that? any thoughts?
Reply
#2
Not Solved
Probably you may want to do a .Exist first and see if it returns true. If yes, then it is not visible to the naked eye and merely hidden at the background which QTP can find as it blindly looks for that object properties. Hence it may be returning the value.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Not Solved
Hi Basanth,

Thank you so much for the reply.

I tried the .exist as well. I said true for both times.
Code:
MsgBox Browser("Username Dropdown").Page("Impersonate User").WebElement("UserName").GetROProperty("visible") = "True"
- This displays result as True

Code:
Browser("Username Dropdown").Page("Impersonate User").WebElement("Cancel").Click
- we Closed the window here

Code:
MsgBox Browser("Username Dropdown").Page("Impersonate User").WebElement("UserName").GetROProperty("visible") = "True"
- This also displays True value even after the modal window is closed.

I am confused on why? Please help!
Reply
#4
Not Solved
Yes. Thats what i had thought. So, the object does exist but is masked by the developer. Hence, you cannot see it on the screen but it does exist at the background.

What is your objective of test? Probably based on that I will be able to suggest.

BTW, If you have tried the visible, would you check it as below.

Code:
MsgBox Browser("Username Dropdown").Page("Impersonate User").WebElement("UserName").GetROProperty("visible")
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Not Solved
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
#6
Not Solved
because close tab window is nothing but a dialog box. For every dialog box has properties for it. GetROProperty is used for getting the property details of the object.As you included GetROProperty statement after closing the dialog box that is the reason it displaying property value after closing the window
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to Close UFT 14.53 through AOM Object y.srihari 1 2,362 12-26-2019, 08:43 PM
Last Post: y.srihari
  GetROProperty and GetVisibleText in QTP sreejith 3 9,843 02-07-2012, 01:20 PM
Last Post: rajpes
  Settings Resources tab missing ppsqtp 0 2,479 10-10-2011, 04:29 PM
Last Post: ppsqtp
  Recovery Scenario tab disabled on Business Components Ravi_Chandra 0 2,524 06-29-2011, 03:54 PM
Last Post: Ravi_Chandra
  Application crashes on clicking a particular tab sandhyach 0 2,430 06-08-2011, 03:17 PM
Last Post: sandhyach

Forum Jump:


Users browsing this thread: 1 Guest(s)