Using Selenium with AutoHotkey- Cross browser automation!
- rizwan4season
- Posts: 15
- Joined: 13 Nov 2020, 08:37
Re: Using Selenium with AutoHotkey- Cross browser automation!
I Want to use Edge Browser With Selenium Like a Chorme Browser
Need Help on this topic
Need Help on this topic
Re: Using Selenium with AutoHotkey- Cross browser automation!
Just found a SeleniumBasic for Selenium v3.141.000. Here is the link in Chinese(Mandarin?).
My own Mandarin is next to useless, so perhaps others in the forum can be of help. However, just using Google Translate gives a lot of clues.
It has reg and unreg .bat files.
I will now try to destroy my system by installing it. I'm curious to see if it might be a significant improvement.
EDIT: This seems very useful indeed. It can control IE, Chrome, Edge (@rizwan4season, this might be worth a look), Opera and Safari out of the box, apparently. I will work on posting something in Ask for Help and Scripts and Functions. The Javascript execution seems to be quite good. It is easy to pass in arguments from the calling script and to return variables from the Javascript call. Async appears to work, unlike SeleniumBasic v2. I have had no success so far getting it to accept Selenium-style Keys.[Key] (i.e. Keys.Enter, Keys.Backspace, Keys.numpad0) from IWebElement.SendKeys(string), but strings themselves work fine. I am for now working around it with "Send, {Enter}" and so on.
Given "svc := ComObjCreate("SeleniumBasic.ChromeDriverService")", "svc.HideCommandPromptWindow := True" runs the script with a hidden command window. Very helpful.
Download link: https://files.cnblogs.com/files/ryueifu-VBA/SeleniumBasic.zip
EDIT: So far so good.
Regards,
burque505
My own Mandarin is next to useless, so perhaps others in the forum can be of help. However, just using Google Translate gives a lot of clues.
It has reg and unreg .bat files.
I will now try to destroy my system by installing it. I'm curious to see if it might be a significant improvement.
EDIT: This seems very useful indeed. It can control IE, Chrome, Edge (@rizwan4season, this might be worth a look), Opera and Safari out of the box, apparently. I will work on posting something in Ask for Help and Scripts and Functions. The Javascript execution seems to be quite good. It is easy to pass in arguments from the calling script and to return variables from the Javascript call. Async appears to work, unlike SeleniumBasic v2. I have had no success so far getting it to accept Selenium-style Keys.[Key] (i.e. Keys.Enter, Keys.Backspace, Keys.numpad0) from IWebElement.SendKeys(string), but strings themselves work fine. I am for now working around it with "Send, {Enter}" and so on.
Given "svc := ComObjCreate("SeleniumBasic.ChromeDriverService")", "svc.HideCommandPromptWindow := True" runs the script with a hidden command window. Very helpful.
Download link: https://files.cnblogs.com/files/ryueifu-VBA/SeleniumBasic.zip
EDIT: So far so good.
Code: Select all
wd := ComObjCreate("SeleniumBasic.IWebDriver")
si(wd)
wd.New_ChromeDriver
wd.URL := "https://www.autohotkey.com"
msgbox Got it.
wd.Quit
wd := ""
si(d) {
VarType := ComObjType(d)
IName := ComObjType(d, "Name")
IID := ComObjType(d, "IID")
CName := ComObjType(d, "Class") ; Requires [v1.1.26+]
CLSID := ComObjType(d, "CLSID") ; Requires [v1.1.26+]
MsgBox % "Variant type:`t" VarType
. "`nInterface name:`t" IName "`nInterface ID:`t" IID
. "`nClass name:`t" CName "`nClass ID (CLSID):`t" CLSID
}
burque505
Last edited by BoBo on 18 Feb 2021, 17:39, edited 2 times in total.
Reason: Fixed broken download link. HTH
Reason: Fixed broken download link. HTH
Re: Using Selenium with AutoHotkey- Cross browser automation!
Google Chrome greater version 88 brings problems with all my applications, respectively only small parts of them work. Is this also the case for you?
Is there an alternative?
Thanks
Is there an alternative?
Thanks
Last edited by Milchmann on 20 May 2021, 07:36, edited 1 time in total.
Re: Using Selenium with AutoHotkey- Cross browser automation!
@Milchmann, you might take a look at this topic. It pertains to v90 with Chrome.ahk, but it seems paths are handled differently in newer versions of Chrome.
Re: Using Selenium with AutoHotkey- Cross browser automation!
That is not the solution. For example, the following commands no longer work from Google Chrome > 88:
Is there a workaround to make these commands work properly again?
Or is it just me using Selenium Basic?
Thank you
Code: Select all
.SendKeys("
.click()
driver.Actions.ClickDouble("w2342424").Perform
.findElementsByTag("tr")
Is there a workaround to make these commands work properly again?
Or is it just me using Selenium Basic?
Thank you
Re: Using Selenium with AutoHotkey- Cross browser automation!
@Milchmann, I'm not experiencing those problems with SeleniumBasic and Chrome v90.
Re: Using Selenium with AutoHotkey- Cross browser automation!
Does not work for me with the following function:
I need the manual start with
because I repeatedly call several sub-programs with chromeGet (). I also continue to work with it in various TABs.
How can I achieve that I can continue working with this method> Chrome 88. Is there a script for that? To make matters worse, I don't have administrator rights on the computer.
Thanks
I need the manual start with
Code: Select all
run, chrome.exe --user-data-dir=C:\Temp\Chrome\Cache\cache\Default --remote-debugging-port=9222
chromeGet()
sleep, 3000
driver.findElementsByClass("f1").item[A_Index].click()
return
ChromeGet(IP_Port := "127.0.0.1:9222")
{
driver := ComObjCreate("Selenium.ChromeDriver")
driver.SetCapability("debuggerAddress", IP_Port)
driver.Start()
return driver
}
How can I achieve that I can continue working with this method> Chrome 88. Is there a script for that? To make matters worse, I don't have administrator rights on the computer.
Thanks
- Thoughtfu1Tux
- Posts: 125
- Joined: 31 May 2018, 23:26
Re: Using Selenium with AutoHotkey- Cross browser automation!
I'm having a ton of issues with Chrome 91 as well. I can send to a page, but i cannot read the contents from a page half the time, be it with name,id, or xpath.
Anyone else having this issue?
Anyone else having this issue?
Re: Using Selenium with AutoHotkey- Cross browser automation!
@Thoughtfu1Tux, if you installed SeleniumBasic (the old version) in Program Files, you might try downloading the chromedriver.exe for v91 and putting it the program folder. I'm not having any unusual issues with Chrome 91 at the moment. No issues with SeleniumBasic v3.141.00 (see my post above or this topic) either, although the webdriver lives in a different folder for the scripts I have using that.
Regards,
burque505
Regards,
burque505
Re: Using Selenium with AutoHotkey- Cross browser automation!
Hi,
Thanks a lot for all the help with Selenium and AutoHotKey !
Would like to know if its possible to set up Selenium grid too with AHK ?
Thanks a lot for all the help with Selenium and AutoHotKey !
Would like to know if its possible to set up Selenium grid too with AHK ?