M
Mostafa Salaheldien
Guest
hello every one,
i have a web page and I'm was getting the values for the classes normal suddenly i get null
after i restart my application sometimes i get the values and sometimes no
what is the problem?
this the class for the web page
<tr data-block-id="150556201_195357302_0_42_0" class="hprt-table-cheapest-block hprt-table-cheapest-block-fix js-hprt-table-cheapest-block" data-et-view="">
<div class="bui-price-display__value prco-ltr-center-align-helper prco-font16-helper" aria-hidden="true">
AED 265
</div>
and this is my code
If WebBrowser1.IsBusy = False AndAlso WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
For Each Element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("tr")
If Element.GetAttribute("className") = "" And Element.OuterHtml.Contains("150556201_195357302_0_42_0") Then
For Each Element1 As HtmlElement In Element.GetElementsByTagName("div")
If Element1.GetAttribute("className") = "bui-price-display__value prco-ltr-center-align-helper prco-font16-helper" Then
Dim Variable1 As String = Element1.InnerText
PricesDetails.stkr.Text = Element1.InnerText
PricesDetails.stkr.Text = PricesDetails.stkr.Text.Replace("AED", "")
End If
Next
End If
Next
End if
Continue reading...
i have a web page and I'm was getting the values for the classes normal suddenly i get null
after i restart my application sometimes i get the values and sometimes no
what is the problem?
this the class for the web page
<tr data-block-id="150556201_195357302_0_42_0" class="hprt-table-cheapest-block hprt-table-cheapest-block-fix js-hprt-table-cheapest-block" data-et-view="">
<div class="bui-price-display__value prco-ltr-center-align-helper prco-font16-helper" aria-hidden="true">
AED 265
</div>
and this is my code
If WebBrowser1.IsBusy = False AndAlso WebBrowser1.ReadyState = WebBrowserReadyState.Complete Then
For Each Element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("tr")
If Element.GetAttribute("className") = "" And Element.OuterHtml.Contains("150556201_195357302_0_42_0") Then
For Each Element1 As HtmlElement In Element.GetElementsByTagName("div")
If Element1.GetAttribute("className") = "bui-price-display__value prco-ltr-center-align-helper prco-font16-helper" Then
Dim Variable1 As String = Element1.InnerText
PricesDetails.stkr.Text = Element1.InnerText
PricesDetails.stkr.Text = PricesDetails.stkr.Text.Replace("AED", "")
End If
Next
End If
Next
End if
Continue reading...