MilenP Posted January 19, 2019 Share Posted January 19, 2019 (edited) Hello Autoit gurus, Today I noticed the following issue when using the IE.au3 UDF with IE version 11.1418.15063.0. Part of my function is: Func SignIn() ;Call the SignIn function if there is entered Username/Password in the GUI Form $g_sLoginIE = _IECreate("https://my.emerchantpay.com/", 0, 1) _IELoadWait($g_sLoginIE) Sleep(500) Local $oUsername = _IEGetObjByName($g_sLoginIE, "username") Local $oPassword = _IEGetObjByName($g_sLoginIE, "password") Local $oButton = _IEGetObjById($g_sLoginIE, "login_button") _IEFormElementSetValue($oUsername, $g_sUsernameInput) _IEFormElementSetValue($oPassword, $g_sPasswordInput) Sleep(500) _IEAction($oButton, "click") _IELoadWait($g_sLoginIE) Sleep(1000) When the page is opened and try to get the _IEGetObjByName the script is failing with; --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.) --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_InvalidObjectType () "C:\Program Files (x86)\AutoIt3\Include\IE.au3" (1876) : ==> The requested action with this object has failed.: If IsObj($oObject.document.GetElementsByName($sName).item($iIndex)) Then If IsObj($oObject^ ERROR You can see that there is also errors regarding the IELoadWait. I have some automations, that are working on older versions of IE, but on the one I am with now they are not working. Can you guys check and advise how I can resolve this. Also as far as I am aware, the IE will be out of support soon, can you please suggest how to proceed when I want to make some browser automations ? Just to add, my Scite version is also updated to the latest, 4.1.2 Thank you in advance! Edited January 19, 2019 by MilenP Link to comment Share on other sites More sharing options...
Subz Posted January 19, 2019 Share Posted January 19, 2019 (edited) _IELoadWait isn't actually very reliable imho, I usually add a Sleep(3000) or longer in place of _IELoadWait. Edited January 19, 2019 by Subz Link to comment Share on other sites More sharing options...
MilenP Posted January 19, 2019 Author Share Posted January 19, 2019 Hello @Subz, I am also using Sleep(xxx) in addition of the _IELoadWait, but the main issue is the other one (The first reported). Thank you, Link to comment Share on other sites More sharing options...
Danp2 Posted January 19, 2019 Share Posted January 19, 2019 Have you tried capturing the IE object variable after the initial _IENavigate? _IECreate("https://my.emerchantpay.com/", 0, 1) $g_sLoginIE = _IEAttach("my.emerchantpay.com", "url") Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MilenP Posted January 19, 2019 Author Share Posted January 19, 2019 Hi @Danp2, Thank you for this suggestion. When adding the $g_sLoginIE = _IEAttach("my.emerchantpay.com", "url") it works.. but before, it was working even without _IEAttach after _IECreate or _IENavigate. Is this because of the new IE version or it was always good practice to use _IEAttach as well ? Link to comment Share on other sites More sharing options...
MilenP Posted January 19, 2019 Author Share Posted January 19, 2019 (edited) Hello again, I have also noticed, that the IE wondows are not hidden, as before $g_oTransactionIE = _IECreate("https://my.emerchantpay.com/transaction/details/index/transid/" & $g_sTransactionInput, 0, 0) I also have the following error message, which is also breaking my script : --> IE.au3 T3.0-2 Error from function _IEDocReadHTML, $_IESTATUS_InvalidDataType If someone have any idea... I don't like IE, but it was working very good until the update Edited January 19, 2019 by MilenP Link to comment Share on other sites More sharing options...
Danp2 Posted January 19, 2019 Share Posted January 19, 2019 The OS update probably resolved a security issue, but that also yielded the results you are seeing. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MilenP Posted January 19, 2019 Author Share Posted January 19, 2019 @Danp2, What would you suggest in this case ? Do you think there will be an update of the IE.au3 or can I use another UDF that will do the job, as currently it seems it is heavily broken Link to comment Share on other sites More sharing options...
Danp2 Posted January 19, 2019 Share Posted January 19, 2019 I wouldn't expect an update to the UDF, primarily because IMO it's your OS that's broken, not the UDF. Alternative would be to switch to the Webdriver UDF (see my sig) MilenP 1 Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MilenP Posted January 22, 2019 Author Share Posted January 22, 2019 Hi @Danp2, I would like to learn how the Webdriver UDF works, but can you please provide me with some examples, as I didn't find. Also I have one question, about clicking a DropDown menu with javascript:void(0),which looks like: I tried using _IELinkClickByText, _IELinkClickByText, _IETagNameGetCollection and _IEGetObjById with _IEAction($xxx, 'Focus') and _IEAction($xxx, 'Click') Can someone please also give me an example how to interact with this dropdown button Thank you guys, Milen Link to comment Share on other sites More sharing options...
Danp2 Posted January 22, 2019 Share Posted January 22, 2019 Hi @MilenP, Did you take a look at wd_demo.au3? There are also other examples posted on the forum. On the Dropdown issue, hard to say without more context. Can you provide a link to the site (or a suitable example that we can review if the site isn't publicly accessible)? Dan Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
MilenP Posted January 22, 2019 Author Share Posted January 22, 2019 Hi @Danp2, Unfortunately, for me, I cannot give a link or suitable example I will try to find something, but if you are able to guide me without having access to the link, would be much appreciated Thank you, Milen Link to comment Share on other sites More sharing options...
Danp2 Posted January 22, 2019 Share Posted January 22, 2019 Looks like Select2 is a jQuery library. Should be fairly easy to use jQuerify to gain access to the jQuery object and then trigger events as necessary. MilenP 1 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