mknope Posted November 21, 2019 Share Posted November 21, 2019 Hello, For the following URL (https://businesslogin.cerner.com/?ReturnUrl=https%3A%2F%2Fdistributions.cerner.com%2F), I am trying to click the button called "Log in with CernerCare". I have tried many different methods but none have worked. Things I have tried include: Local $oDivs = _IETagNameGetCollection($oIE, "div") For $oDiv In $oDivs If $oDiv.ClassName = "provider__logo" Then _IEAction($oDiv, "click") MsgBox($oDiv) Next ---------------------------- _IELinkClickByIndex($oIE,6) -------------------------- _IELinkClickByText($oIE,"Log in with CernerCare") Link to comment Share on other sites More sharing options...
Developers Jos Posted November 21, 2019 Developers Share Posted November 21, 2019 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted November 21, 2019 Share Posted November 21, 2019 Works : #include <Constants.au3> #include <IE.au3> Opt ("MustDeclareVars", 1) Global $oIE = _IECreate ("https://businesslogin.cerner.com/?ReturnUrl=https%3A%2F%2Fdistributions.cerner.com%2F") Global $oTags = _IETagNameGetCollection ($oIE, "a") For $oTag in $oTags If $oTag.className = "button provider provider--cernercare" Then $oTag.click () MsgBox ($MB_SYSTEMMODAL,"","Found") ExitLoop EndIf Next “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
mknope Posted November 21, 2019 Author Share Posted November 21, 2019 I am seeing the following in the console when I try your code: --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023174, Browser has been deleted prior to operation.) --> IE.au3 T3.0-2 Error from function _IETagNameGetCollection, $_IESTATUS_InvalidObjectType "C:\Visual Studio\AIS\AIS Package Management\AutoIT\Install Hist Export.au3" (8) : ==> Variable must be of type "Object".: For $oTag in $oTags For $oTag in $oTags^ ERROR >Exit code: 1 Time: 2.647 Link to comment Share on other sites More sharing options...
Nine Posted November 21, 2019 Share Posted November 21, 2019 Seems you got some trouble with connection. Close all IE connection, maybe reboot comp, run my script only... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Danp2 Posted November 21, 2019 Share Posted November 21, 2019 KISS -- $oIE = _IECreate ("https://businesslogin.cerner.com/?ReturnUrl=https%3A%2F%2Fdistributions.cerner.com%2F") _IELinkClickByText($oIE, "Log in with CernerCare") 😝🙂 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mknope Posted November 21, 2019 Author Share Posted November 21, 2019 I am still getting the same error after trying the things you suggested. Link to comment Share on other sites More sharing options...
Danp2 Posted November 21, 2019 Share Posted November 21, 2019 @mknope You shouldn't be receiving these errors from _IECreate, so I suspect there is something unique with your setup that is causing that issue. You can try working around it with an additional call to _IEAttach -- #include <IE.au3> Opt ("MustDeclareVars", 1) _IECreate ("https://businesslogin.cerner.com/?ReturnUrl=https%3A%2F%2Fdistributions.cerner.com%2F", 0, 1, 0) Local $oIE = _IEAttach("businesslogin.cerner.com", "url") _IELoadWait($oIE) _IELinkClickByText($oIE, "Log in with CernerCare") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mknope Posted November 21, 2019 Author Share Posted November 21, 2019 @Danp2 Yours works but only when I had a second instance of IE running. Link to comment Share on other sites More sharing options...
Danp2 Posted November 21, 2019 Share Posted November 21, 2019 Sorry, but that doesn't make sense to me. As I mentioned previously, it sounds like your workstation is having issues. Do you have a different PC where you can test the code? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
mknope Posted November 21, 2019 Author Share Posted November 21, 2019 I was able to just get this to work after changing some of the settings within IE. $oIE = _IECreate ("https://businesslogin.cerner.com/?ReturnUrl=https%3A%2F%2Fdistributions.cerner.com%2F") _IELoadWait($oIE) _IELinkClickByText($oIE, "Log in with CernerCare") Danp2 1 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