Under VB.NET code, how would i locate the value of an ID tag field on a HTML page?
I have a page with this context:
<tr><td> | |
<b>Balance</b> | |
<span class="dxeBase_dummy" id="P_L_V_v17w2_t1_DueDateInsLabel" style="font-weight:bold;">Due on 9/4/2015</span> | |
</td><td style="text-align: right;"> | |
<span class="dxeBase_dummy" id="P_L_V_v17w2_t1_CurrentBalanceInsLabel">1.00</span> | |
</td></tr> | |
<tr><td> |
I am trying to extract the value of tag P_L_V_v17w2_t1_CurrentBalanceInsLabel (1.00) and pull it to a string. I have looked through the support pages for too long. Best i found was this: http://support.smartbear.com/viewarticle/68529/
but this is not anything close to what i need here. Could somebody please point me in the right direction here? Seems like a very simple operation to carry out, reading the content of a id tag on a web page.
Can anyone please help? Thanks in advance!
Here is the solution you are after bozo:
Function GetBalanceInfo()
Dim browser, page, Obj
Set browser = Sys.Browser("*")
Set page = browser.Page("*")
GetBalanceInfo = "*" ' Note that we used the * wildcards to specify the search pattern
Set obj = Aliases.browser.pagePersonableEmployeeWebPortal.formForm1.panelMpage.textnodePLVV11w2T1Currentbalance
GetBalanceInfo = obj.contentText
' Checks the result
If obj.Exists Then
Call Log.Message("Object containing text '" & GetBalanceInfo & "' is found", obj.FullName)
Else
Call Log.Warning("Object containing text '" & GetBalanceInfo & "' was not found.")
End If
End Function