05-03-2018, 02:13 PM
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