Selenium - Headless chrome? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Axxi
Posts: 15
Joined: 02 Apr 2020, 10:56

Selenium - Headless chrome?

02 Jun 2020, 03:04

Hi!

Just wondering if its possible to run selenium headless on chrome? Would appreciate if someone could point me in the right direction, been trying to search the net but cant find anything related to autohotkey.

Thanks in advance!
Axxi
Posts: 15
Joined: 02 Apr 2020, 10:56

Re: Selenium - Headless chrome?

03 Jun 2020, 06:44

BoBo wrote:
03 Jun 2020, 06:26
:arrow: autohotkey Broken Link for safety selenium headless chrome
Anything? Really?? :think:
There seems to be some posts related to chrome.ahk, but I cant find anything related to selenium/autohotkey running headless, if you could please pick one of the links and show me i'd appreciate it, but i just cant seem to find one :(
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Selenium - Headless chrome?  Topic is solved

03 Jun 2020, 11:39

Working Example:

Code: Select all

driver := ComObjCreate("Selenium.ChromeDriver")
driver.AddArgument("--disable-gpu")
driver.AddArgument("--headless")
driver.Get("https://www.autohotkey.com/boards/viewtopic.php?f=76&t=76775") 
MsgBox % driver.FindElementByXPath("//*[@id='post_content332970']/div").Attribute("innerText")
driver.Quit()
ExitApp
Axxi
Posts: 15
Joined: 02 Apr 2020, 10:56

Re: Selenium - Headless chrome?

13 Jun 2020, 06:51

Xtra wrote:
03 Jun 2020, 11:39
Working Example:

Code: Select all

driver := ComObjCreate("Selenium.ChromeDriver")
driver.AddArgument("--disable-gpu")
driver.AddArgument("--headless")
driver.Get("https://www.autohotkey.com/boards/viewtopic.php?f=76&t=76775") 
MsgBox % driver.FindElementByXPath("//*[@id='post_content332970']/div").Attribute("innerText")
driver.Quit()
ExitApp
Thank you so much Xtra for taking the time providing me with a working example, you have no idea how much this is going to help my coworkers with their daily tasks. Thank you x100, much appreciated!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Holarctic, jameswrightesq and 422 guests