Natalicio Posted June 25, 2019 Share Posted June 25, 2019 Good, How are you? I'm trying to use UIAutomation but to no avail. I would like to access the page, enter login and password and click the Enter button. I have tried in many ways. I can do it quietly in IE UDF, but I would like to do it in Chorme. Can you help me? Follow the page address below. Access the URL: "https://login.vivo.com.br/loginmarca/appmanager/marca/publico?acesso=empresas&_ga=1.215903191.1168325316.1480354519&documento=29694432871&app=legacy#") Enter Manager Login Enter Password Click on Enter / Submit Help please! Tks Link to comment Share on other sites More sharing options...
Danp2 Posted June 25, 2019 Share Posted June 25, 2019 Suggest that you post your code showing that you've tried thus far. Also, see my signature for an alternative method of automating websites. Dan Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Natalicio Posted June 25, 2019 Author Share Posted June 25, 2019 Hello, Danp2. Thank you for orienting me. The reason I want to use Chorme instead of IE is because _IEACTION (CLICK) fails. One hour it works another not. If by chance this action did not fail, my project would be complete. This is what I have today and I would like to know what I am doing wrong .. because sometimes it works and another does not Click here... After I click on those three dots, a menu appears. This.. _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") While Not 1 _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) WEnd Local $sMyString = "Baixar" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then $sBaixa = "Sim" Local $oElements = _IETagNameGetCollection($oIE, "a") For $oElement In $oElements If $oElement.id=="downloadBoleto0" Or $oElement.id=="downloadFatura0" Then _IEAction ($oElement, "click") While Not 1 Sleep(500) _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) _IEAction($oLink, "click") Sleep(500) WEnd EndIf Next Link to comment Share on other sites More sharing options...
Developers Jos Posted June 25, 2019 Developers Share Posted June 25, 2019 Moved to the appropriate forum, as the AutoIt Example Scripts forum very clearly states: Quote Share your cool AutoIt scripts, UDFs and applications with others. Do not post general support questions here, instead use the AutoIt Help and Support 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...
Natalicio Posted June 25, 2019 Author Share Posted June 25, 2019 Sorry Please Link to comment Share on other sites More sharing options...
junkew Posted June 25, 2019 Share Posted June 25, 2019 Try what simplespy gives you. Maybe later this week I will give you a step by step instruction with simplespy. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
Natalicio Posted June 25, 2019 Author Share Posted June 25, 2019 Thank you. I need a lot of help. I want to understand better or start taking the first steps towards clean and safe programming. Now, why does my _IEAction ("click") fail at times? Were my procedures wrong? Link to comment Share on other sites More sharing options...
Natalicio Posted June 25, 2019 Author Share Posted June 25, 2019 7 hours ago, Danp2 said: Sugira que você publique seu código mostrando que tentou até agora. Além disso, veja minha assinatura para um método alternativo de automatizar sites. Dan How can I handle the click actions, downloads of a Chrome page according to the previous message? Link to comment Share on other sites More sharing options...
Exit Posted June 25, 2019 Share Posted June 25, 2019 Please post your complete script. But please put it in a code box. See the "<>" above the edit box. In your fragment of the script, I found a definitly wrong statement: While Not 1 The 2 statements below will never be executed App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Natalicio Posted June 26, 2019 Author Share Posted June 26, 2019 Hello Exit, Make up for my delay, below, follow what I used today. When I ask him to click on the image: _IEImgClick (...) It opens a menu and then it searches in this drop down menu (as pictured above) the item Download the Invoice or Download Ticket. In case I use the _IEAction ("click"). That's where the situation is: One hour works and not another time. That's why I thought of While, While not true, it insists on _IEAction ("click"). _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") While Not 1 _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) WEnd Local $sMyString = "Baixar" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then $sBaixa = "Sim" Local $oElements = _IETagNameGetCollection($oIE, "a") For $oElement In $oElements If $oElement.id=="downloadBoleto0" Or $oElement.id=="downloadFatura0" Then _IEAction ($oElement, "click") While Not 1 Sleep(500) _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) _IEAction($oLink, "click") Sleep(500) WEnd EndIf Next EndIf Next And one thing he always wanted to know: In Chrome it opens directly in the Save As Dialog Box, but in Internet Explorer, it first opens a bar at the bottom of the page and I have to click on the Save filter to choose save as and then open the dialog box. Is there any way to open direct, or better yet, save direct on the desired path? Thank you in advance, to help me because I loved this tool and I want to enjoy the best of it. Thank you very much. Link to comment Share on other sites More sharing options...
Exit Posted June 26, 2019 Share Posted June 26, 2019 You probably have not read my post? 14 hours ago, Exit said: In your fragment of the script, I found a definitly wrong statement: While Not 1 The 2 statements below will never be executed And this statement is twice in the script. And I asked you to post the full script. Or at least an executable example. App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Natalicio Posted June 26, 2019 Author Share Posted June 26, 2019 Yes, I have read and understood your information, but I have a question ... If in case Click stops working in the UDF, how can I ask him to repeat the action? Link to comment Share on other sites More sharing options...
Natalicio Posted June 26, 2019 Author Share Posted June 26, 2019 Another detail is that I can not put the script to run with the password and login, as it is confidential. And to access this process we need the Login Link to comment Share on other sites More sharing options...
Exit Posted June 26, 2019 Share Posted June 26, 2019 while not 1 ==> while @error App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Natalicio Posted June 26, 2019 Author Share Posted June 26, 2019 Ah okay I will test and already position you on the action. Link to comment Share on other sites More sharing options...
Natalicio Posted June 27, 2019 Author Share Posted June 27, 2019 Hello, According to the tests performed 2 different scenarios: 1) _IEAction ("click") does not perform the action. 2) When it executes, the box at the bottom of the window (of the Open / Save), appears but is frozen, the action to Save As is not executed. What am I doing wrong? Below is the moment when the script is fired and the HTML so that it can point to something that I forgot or did the wrong procedure, orient me and explain and so I do not go wrong again. I've been in this fight for a long time and without success. Thank you in advance for your help. expandcollapse popup;Click to Download $sBaixa = "" _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(1000) While @error _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) WEnd Local $sMyString = "Baixar" Local $oLinks = _IELinkGetCollection($oIE) For $oLink In $oLinks Local $sLinkText = _IEPropertyGet($oLink, "innerText") If StringInStr($sLinkText, $sMyString) Then $sBaixa = "Sim" Local $oElements = _IETagNameGetCollection($oIE, "a") For $oElement In $oElements If $oElement.id=="downloadBoleto0" Or $oElement.id=="downloadFatura0" Then Sleep(1000) _IEAction ($oElement, "click") Sleep(500) While @error Sleep(500) _IEAction($oLink, "click") Sleep(500) WEnd ExitLoop 2 EndIf Next EndIf Next If $sBaixa = "Sim" Then Local $hWnd = WinWait("[IEFrame]", "", 10) Do Sleep(1000) Until ControlCommand($hWnd, "", "DirectUIHWND1", "IsVisible", "") Sleep(500) ;Clicar no Filtro em Salvar ControlClick($sText, "", "[CLASS:DirectUIHWND; INSTANCE:1]", "left", 1, 838, 29) ;Send("{TAB 2}") Sleep(1000) Send("{Up}") Sleep(500) Send("a") Link to comment Share on other sites More sharing options...
Exit Posted June 27, 2019 Share Posted June 27, 2019 _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(1000) While @error ; will never entered due to no error in sleep statement _IEImgClick($oIE, "/meuvivoempresas/ShowPropertyServlet?nodeId=/UCMRepository/MVE_ICON_TRESPONTOS", "src") Sleep(500) WEnd While @error ; will never entered due to no error in sleep statement App: Au3toCmd UDF: _SingleScript() Link to comment Share on other sites More sharing options...
Natalicio Posted June 27, 2019 Author Share Posted June 27, 2019 Thanks for the feedback. So in case, I have to take Sleep is it? What about the Open / Save box, why can not I focus on it? Did I do something wrong? Or does it have to do with Sleep? Link to comment Share on other sites More sharing options...
Natalicio Posted June 27, 2019 Author Share Posted June 27, 2019 The _IEAction's Click action still fails, not showing the Open / Save box (bottom of page). 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