Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to identify a Dynamic WebElement?
#1
Not Solved
I want to identify a web element (TIN Number) which is dynamic in nature. Every time the value is different. I used below code.  The innertext is not updating . How to identify innertext dynamically? I have attached object spy as well. Currently TIN value is "113482671" but will change in the next iteration. Please help!!


Code:
Public Function SelectTIN()
Dim obj
Set a=Description.Create
a("html tag").value = "A"
a("micclass").value="Link"
a("innerhtml").value= Datatable.value("TINNumber")
set obj = Browser("Micclass:=Browser").Page("Micclass:=Page").ChildObjects(a)
x= obj.count
For i=0 to x-1
obj(i).click
Next
SelectTIN = True
End Function

Code:
'..........Store TIN Number
Public Function StoreTINNumber()
TINNumber = Browser("1099 Detail DB").Page("1099 Detail DB").WebElement("ctl00$ContentPlaceHolder1$gvEd").GetROProperty("innertext")
DataTable.Value("TINNumber","Search Shared TIN")= TINNumber
StoreTINNumber = True
End Function


Code:
'............Get TIN Number
Public Function GetTINNumber()
Dim obj
Datatable.GetSheet("Search Shared TIN")
Set a=Description.Create
a("html tag").value = "A"
a("micclass").value="Link"
a("innerhtml").value= Datatable.value("TINNumber","Search Shared TIN") 'It will give value 00001545
set obj = Browser("Micclass:=Browser").Page("Micclass:=Page").ChildObjects(a)
x= obj.count
For i=0 to x-1
obj(i).click
Next
GetTINNumber = True
End Function


Attached Files Image(s)
   
Reply


Messages In This Thread
How to identify a Dynamic WebElement? - by PreethiJoshi - 05-03-2018, 02:13 PM
RE: Get Dynamic Innertext - by Ankur - 05-03-2018, 04:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  not able to identify an webelement object Ninjukp 0 2,108 01-10-2018, 09:25 PM
Last Post: Ninjukp
  How to identify dynamic webtable as unique in QTP? sudheendramurthy 4 18,107 02-23-2016, 06:16 PM
Last Post: vinod123
  Dynamic Webelement Value Novemberrain81 2 6,517 09-30-2013, 11:09 PM
Last Post: Parke
  Identifying radio buttons with same html ID but dynamic webelement properties manishac 12 13,080 05-03-2012, 06:27 AM
Last Post: manishac
  unable to extract dynamic object values-webelement object naniblr9 1 3,091 11-10-2009, 12:20 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)