Valnurat Posted February 9, 2018 Posted February 9, 2018 Hi. If I use this code: #include <IE.au3> #include <MsgBoxConstants.au3> Local $sServiceTAG = "9S1Y3J2" Local $oIE = _IECreate("http://www.dell.com/support/home/uk/en/ukbsdt1/product-support/servicetag/" & $sServiceTAG & "/warranty?ref=captchasuccess",Default,0,0) _IELoadWait($oIE) Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If StringStripWS($oTd.innertext, 7) = "NBD ProSupport" Then $sShipdate = StringStripWS($oTd.NextElementSibling.InnerText, 7) ExitLoop EndIf Next _IEQuit($oIE) MsgBox($MB_SYSTEMMODAL, "Warranty", $sShipdate) My messagebox is empty, but if I use the link first: http://www.dell.com/support/home/uk/en/ukbsdt1/product-support/servicetag/9S1Y3J2/warranty?ref=captchasuccess and then use my code I get results. Can someone help so I don't need to use the link first. Yours sincerely Kenneth.
Subz Posted February 9, 2018 Posted February 9, 2018 Use Dells api to access warranty information you'll need to get an apikey first though: https://techdirect.dell.com/portal.30/AboutAPIs.aspx
Danp2 Posted February 9, 2018 Posted February 9, 2018 The TD element hasn't loaded when your script runs. You'll have to loop and wait until the page is fully loaded or use the solution recommended by @Subz. Latest Webdriver UDF Release Webdriver Wiki FAQs
Valnurat Posted February 9, 2018 Author Posted February 9, 2018 Do you know how to use this? Yours sincerely Kenneth.
Valnurat Posted February 9, 2018 Author Posted February 9, 2018 29 minutes ago, Danp2 said: The TD element hasn't loaded when your script runs. You'll have to loop and wait until the page is fully loaded or use the solution recommended by @Subz. But can I access it if I do it manually and then running my script? Yours sincerely Kenneth.
Subz Posted February 9, 2018 Posted February 9, 2018 If you Google for "Dell api get warranty" you'll find a number of examples which are easily adaptable to autoit example: https://gallery.technet.microsoft.com/scriptcenter/PowerShell-Script-Get-Dell-d7fd6367
Danp2 Posted February 9, 2018 Posted February 9, 2018 14 minutes ago, Valnurat said: But can I access it if I do it manually and then running my script? Yes, because you've allowed the page to fully load by that point in time. Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now