Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the Webelement object name.
#1
Solved: 8 Years, 3 Months, 4 Weeks ago
Hi All,

I am new to UFT and very much new to web browser automation.

So , I want to store the webelement name in a variable. 
(Need: I need to get the UTC time increment value from google. Im googling with "BKK time". And there will be a value like this - "GTM+7". And I need that "7 " value. I am trying to store this value in a variable.)


 Im trying the this:
================

Code:
SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe", "https://www.google.com"


Browser("Google Search").Page("Google Search").WebEdit("Search").Set "BKK time"
Browser("Google Search").Page("Google Search").WebEdit("Search").Submit
Browser("Google Search").Page("Google Search").WebElement("(GMT+.*)").highlight

 val = Browser("Google Search").Page("Google Search").WebElement("(GMT+.*)").{****}


print val


====================
What can I replace {****} with to get the required information.

Please help me .


Thanks,
Shilpa G
Reply
#2
Solved: 8 Years, 3 Months, 4 Weeks ago
Its ok. I am able to get the webelement name Smile  GetROProperty("innertext") will do the work
Ans:

Code:
val = Browser("Google Search").Page("Google Search").WebElement("(GMT+.*)").GetROProperty("innertext")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation WebElement("WebElement").Click is not working sia sharma 7 23,959 09-28-2016, 08:58 PM
Last Post: supputuri
Question Add DataTable column parameter to WebElement in Object Repository? MGMN 0 3,596 10-07-2008, 11:02 PM
Last Post: MGMN
  prob with WebElement object swarnavure 4 4,529 09-26-2008, 04:17 PM
Last Post: Sonia

Forum Jump:


Users browsing this thread: 1 Guest(s)