CaptainBeardsEyesBeard Posted October 15, 2019 Share Posted October 15, 2019 Hi, I'm trying to access a class in IE and have the following code I took from googling this issue on this forum Local $oListItems = _IETagNameGetCollection ($oIE, "wrapper") For $oListItem In $oListItems Local $odivs = _IETagNameGetCollection($oListItem, 'div') For $odiv in $odivs Local $dataVin = $odiv.getAttribute("col-lg-12") If $dataVin <> '' Then ConsoleWrite('+ Found it, class: ' & $dataVin & @CRLF) if $datavin.value == "Upload Costs" Then ConsoleWrite("Upload costs has been found and $datavin equals: " & $datavin ) Endif ConsoleWrite('----------------------------' & @CRLF) EndIf Next Next ConsoleWrite('!--------- ENDING ----------' & @CRLF) At the moment it fails at this line (the first for loop...See attached screenshot) I've also attached a screenshot of the class I'm trying to access Thanks Link to comment Share on other sites More sharing options...
Danp2 Posted October 15, 2019 Share Posted October 15, 2019 It's difficult to diagnose without the full script to review, but it appears that you have an issue with your _IEAttach failing. Once that occurs, the rest of your script will also fail. Add some error checking and exit the script when failure is detected rather than blindly continuing on. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
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