Sign in to follow this  
Followers 0
Fukima

Autoit and Chrome interaction

1 post in this topic

#1 ·  Posted (edited)

Hi guys,

First and foremost I just want to thank you'll for all the help that you been given to me. Autoit forum is one of the best forums I been a part of, if not the best. 

Secondly, I have another question for your guys and hopefully one of you all can help me with it.

All I want to do is to open chrome and interact with the page by clicking in one of the options of the webpage. 

My problem is that the option or button that I want to interact with doesn't have an "id" that I can use. So I decided to run a queryselector method and tried to add that to the script. 

According to what I understood from the UDF "Chrome.au3" the function name  _ChromeEval() could perform that, below is my script:

; Closes Chrome if open
    _ChromeShutdown()

         ; Opens Chrome with that link, is that a way to use incognito with this function???
    _ChromeStartup("https://link.gexcxcxcxtsync.com")


        ; Wait for the page with the document title of "itTorrent Sync - Link received"
    _ChromeDocWaitForExistenceByTitle("itTorrent Sync - Link received", 10)

         ; I ran this query selector on chrome tools and it found the button I want to interact with
         ; I just need help running this in autoit 
        _ChromeEval(document.querySelector(".btn-primary-stroke"), 5 )

Thank you again 

Edited by Fukima

[spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler]

Never compromise even in the face of Armageddon

 

 

[/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • TheWizEd
      By TheWizEd
      It seems AutoIt for Chrome is no longer working.  It's not in Google Store so not able to enable.  I can download the crx and drag to chrome but I can't figure out any way to enable the extension.
    • zxc3
      By zxc3
      Are there any examples of a script for Сhrome that allows you to check whether the information in the browser window has changed with a certain periodicity and signal this for 32-bit Windows.
    • fenhanxue
      By fenhanxue
      Q 1:
      How to judge whether the Chrome has been installed. How to get the complete route of chrome if it is installed?

      Q 2:
      How to judge whether the Adobe Flash Player has been installed.
    • FMS
      By FMS
      Hello,
      I'm trying to wright a automated process to show some URL's in chrome browsers on multiple screens.
      I've 4 screens and want to show on each screen another instance of chrome whit its own URL.
      In mine search on the site i din't find any topic for this specific problem.
      The way I was trying is something like :
      ShellExecute("chrome.exe", "http://URL1 --start-maximized") so I'll not see the addressbar but it was not opend full screen .
      I've some questions about this way:
      -Is there a way to maximize it on a dedicated screen ?
      (like URL1 on screen 1 , URL2 on screen 2 etc...)
      -Shellexecute will add a tab on a existing browser and will not open another instance, is there a way to work around this?
      Is there somebody who had the same problem whit chrome?
      thanks in advanced.
      edit: I've checked the chrome UDF but it din't same to get the job done....
    • BlazerV60
      By BlazerV60
      Hello all,
      I've been trying to figure out how to launch Google Chrome in the background (hidden) but it doesn't seem possible. I've tried the following methods:
      ShellExecute("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", "", "", "", @SW_HIDE) Also I've tried:
      ShellExecute(@ComSpec, "/c start chrome.exe","","",@SW_HIDE) Lastly I tried:
      RunWait('"'&@ProgramFilesDir&'\Google\Chrome\Application\chrome.exe" --silent-launch',@ScriptDir)  
      But all of them launch my chrome browser without hiding it. Does anyone know a workaround for this or if AutoIT just can't Chrome? 
      Bonus points if you know how to make it launch chrome hidden and make it go to https://www.autoitscript.com
       
      Thank you,
      Brian