Bert Posted July 28, 2013 Share Posted July 28, 2013 Chrome can easy be automated with ui automation. Search in the forum for ui automation. - Chrome is designed to resist automation in a web page. Sure you can click on a Chrome control but you can't automate something in the web page your viewing with chrome. That is what the original poster is asking for. If you bothered to read the entire string you would have gotten that. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
SergeySpandaryan Posted July 29, 2013 Author Share Posted July 29, 2013 So mad. I just want to put address in the address bar of Chrome. I quoted a person who did it but I can't repeat his result. Can anyone help? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 29, 2013 Moderators Share Posted July 29, 2013 SergeySpandaryan, Can anyone help?You have been told several times that Chrome is resistant to automation and have been offered several code snippets which obviously work for the poster. As these snippets do not work for you, it seems that your particular Chrome installation is even more resistant than most to automation - but that is something outside our control. AutoIt uses the Windows API or COM to do its magic - if, as in this case, these avenues are not available then there is little chance of AutoIt being able to do what you want. So there is no point in getting "mad" - if it does not work on Chrome, then it does not work and you will just have to accept that. If you want to automate a browser, then install IE or FireFox as suggested earlier. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Bert Posted July 29, 2013 Share Posted July 29, 2013 Sigh - This works BUT it will only navigate to the URL you specify. If you want to interact with the controls on the webpage let me make this perfectly clear: CHROME DOES NOT LET YOU DO THAT. Opt("WinTitleMatchMode", 2) $url="https://www.youtube.com" WinActivate("Google Chrome") ControlSetText("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]", $url) sleep(10) ControlSend("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]","{ENTER}") The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 29, 2013 Moderators Share Posted July 29, 2013 NO. YOU CAN NOT USE CHROME TO DO WHAT YOU ARE ASKING FOR. I get the feeling you're trying to tell us something... "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bert Posted July 29, 2013 Share Posted July 29, 2013 you think? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
trancexx Posted July 29, 2013 Share Posted July 29, 2013 So anyway, do what junkew member told you. Chrome supports UIAutomation and exposes needed objects. You can use it to interact with the web controls as well as with the Chrome window itself.I'm sorry that junkew's English (and AutoIt) isn't a bit better. Then you would see what UIAutomation means for all this, not just Chrome automation.People who want to make you believe things aren't possible because they don't know of the ways, should really learn to shut (the fuck) up and let the people who know how to do things to speak. I'm just saying. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 29, 2013 Moderators Share Posted July 29, 2013 trancexx, let the people who know how to do things to speakThen why not take your own advice and actually give the OP an example of how to do it, rather than just the usual cryptic remark about "UIAutomation" and "needed objects". That is probably not a great deal of use to him - even a link would be helpful. And please do not bother replying, I fully realise I am talking to the hand where you are concerned..... M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
trancexx Posted July 29, 2013 Share Posted July 29, 2013 ^^ The OP first needs to show interest and even more - willingness to learn. Otherwise it's pearls and swines thing. And "we" don't want that, right? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Gianni Posted July 29, 2013 Share Posted July 29, 2013 ^^ The OP first needs to show interest and even more - willingness to learn. Otherwise it's pearls and swines thing. And "we" don't want that, right? please, I'd be interested to see this pearl,thank you!Oink Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
trancexx Posted July 30, 2013 Share Posted July 30, 2013 (edited) Ehh right. junkew forum member gave the OP a hint on how to proceed. It's the post in this thread, >here's the link. In that post junkew suggests to the OP to search the forum for UI Automation or as he said "ui automation". If any of you did that you would find couple of threads where UIAutomation is talked about. In one of those threads there would be script that can actually be run. If you bothered to do that you would see that UIAutomation can reference web content inside Chrome browser window. Sure, it's not much in junkew's "form", but you can detect input boxes, buttons, etc. Then normal person if intigued would search the web for UI Automation to get familiar with the concept and the API itself. Microsoft provides detailed explanation for programmers starting here. If you would try to search for examples you would among others find this particular one. That example is written in C# and VB and you can use it to fill search box on google.com for example inside Chrome browser if the OP wants (even) that, even though the code he want's have already very likely been posted here. But no, YogiBear MVP started flaming instead, posting face palms, using big fonts and caps lock and moderator felt need to say I was cryptic (OMG) when I pointed to junkew's post as possible solution. Maybe to open eyes and use head next time, moderator. It's been said many times that serving the solutions is not particularly good idea if you want people to learn. So really what I will do is pay attention to the site index today to see if "User Moderation" forum gets new thread mentioning YogiBear MVP after the flaming he exibited. Edited July 30, 2013 by trancexx ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 30, 2013 Moderators Share Posted July 30, 2013 (edited) YogiBear,Those posts were uncalled for - please would you be so kind as to delete them and apologise. trancexx,Thank you for posting some links to help those of us with less knowledge of the more arcane stuff - sharing is what the forum is all about. `And please do not waste your time looking for anything being added to the "User Moderation" section just yet. M23Edit:YogiBear,Thanks. Edited July 30, 2013 by Melba23 czardas 1 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
trancexx Posted July 30, 2013 Share Posted July 30, 2013 sharing is what the forum is all about. ` Oh wow, thank you for letting me know. I guess I have learned something new today then. Not. The other thing doesn't surprise me. Doing the right thing isn't always simple. I guess some people just don't have what it takes inside them. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 30, 2013 Moderators Share Posted July 30, 2013 trancexx, Doing the right thing isn't always simple. I guess some people just don't have what it takes inside themYou could be right - but then you could also be wrong. But keep guessing away if it makes you happy. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
SergeySpandaryan Posted August 1, 2013 Author Share Posted August 1, 2013 Sigh - This works BUT it will only navigate to the URL you specify. If you want to interact with the controls on the webpage let me make this perfectly clear: CHROME DOES NOT LET YOU DO THAT. Opt("WinTitleMatchMode", 2) $url="https://www.youtube.com" WinActivate("Google Chrome") ControlSetText("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]", $url) sleep(10) ControlSend("Google Chrome", "", "[CLASS:Chrome_OmniboxView; INSTANCE:1]","{ENTER}") Thank you very much, works like a charm. Link to comment Share on other sites More sharing options...
junkew Posted August 1, 2013 Share Posted August 1, 2013 (edited) After my holiday i will make a small chrome demo based on the uiautomation framework. You have to set a flag when you start chrome or respond to a broadcast sendmessage that chrome sends when starting so accessibility can respond properly. Then the html elements are exposed to be accessible. You will not have all dom details but more then enough to do the basic stuff. Edited August 1, 2013 by junkew 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...
Moderators Melba23 Posted August 1, 2013 Moderators Share Posted August 1, 2013 junkew,After my holiday i will make a small chrome demo based on the uiautomation frameworkThank you - that would be very useful to a lot of members. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
junkew Posted August 1, 2013 Share Posted August 1, 2013 Will give examples on the basics of ui automation. Partly it becomes easier with objcreateinterface function in autoit. 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...
trancexx Posted August 1, 2013 Share Posted August 1, 2013 After my holiday i will make a small chrome demo based on the uiautomation framework. You have to set a flag when you start chrome or respond to a broadcast sendmessage that chrome sends when starting so accessibility can respond properly. Then the html elements are exposed to be accessible. You will not have all dom details but more then enough to do the basic stuff. Oh there you are. Great! If you do good job maybe I even get that apology from the Yogi character and that other guy finaly stops stalking me. If you would need something from me just let me know. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
junkew Posted August 11, 2013 Share Posted August 11, 2013 I have started the basic UI automation framework in this thread. Based on that I wil make a further working demo on chrome in a separate thread'?do=embed' frameborder='0' data-embedContent> title=""> For those who are in a hurry they can try themselves als long as you start chrome properly you should be able to access elements thru UIA chrome browserchrome://accessibility in the adress bar of chrome or start with "--force-renderer-accessibility" http://dev.chromium.org/developers/design-documents/accessibility 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...
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