Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
difference
01-18-2012, 08:44 AM
Post: #1
difference

Hi,
What is the difference between below two steps.

Browser("Googgle").Page("Google").WebEdit("Search").Set "QTP"

Browser("Googgle").Page("Google").WebEdit("Search").Object.

First line is normally we r using.in second step how we can approach

Regards,
Arul
Find all posts by this user
Quote this message in a reply
01-31-2012, 09:08 AM
Post: #2
RE: difference
second line is to get handle to the web object in the html DOM (in your case it's webeidt).Through this you can get/set any property listed in the "run time object properties" when you spy on the webeidt.

eg:msgbox Browser("Googgle").Page("Google").WebEdit("Search").Object.isContentEditable 'isContentEditable is a property which you can not retrieve through GetRoProperty
Find all posts by this user
Quote this message in a reply
01-31-2012, 12:18 PM
Post: #3
RE: difference
(01-31-2012 09:08 AM)rajpes Wrote:  second line is to get handle to the web object in the html DOM (in your case it's webeidt).Through this you can get/set any property listed in the "run time object properties" when you spy on the webeidt.

eg:msgbox Browser("Googgle").Page("Google").WebEdit("Search").Object.isContentEditable 'isContentEditable is a property which you can not retrieve through GetRoProperty

RajPes -
The above statement holds 90% correct except for the last line. "You can retrieve all of the properties using the GetRoproperty as to what you can do through the DOM as well. For eg: oVal = Browser().Page().Webedit().GetRoproperty("isContentEditable") will return a Value 1 or 0 depending upon the settings".
However, the other ease in using the .object is to aid in clear programming.
Code:
Set oObj = Browser().Page().Webedit().object
msgbox oObj.IsContenteditable

Basanth
QTP On Unix- Java Way - Without Putty or Terminal Emulation
You have no idea how high I can fly...
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)