Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 30 Dec 2022, 09:29

Sadaosh1970 wrote:
30 Dec 2022, 09:18
Thank you.
.activetab() latest tab is good.

But the latest version of Rufaydium can no longer get into Firefox. :(
It works for me, try deleting geckodriver so it can download the latest, I got firefox 107.0.1, at work it is not being upgraded may be,
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

Sadaosh1970
Posts: 19
Joined: 29 Nov 2022, 06:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Sadaosh1970 » 30 Dec 2022, 10:55

I deleted the geckdriver.
I've been downloaded again.
Firefox loads, but this error message appears. :(
Attachments
2022_12_30_12_44_47_Rufaydium_WebDriver_Error.png
2022_12_30_12_44_47_Rufaydium_WebDriver_Error.png (8.46 KiB) Viewed 3699 times

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 30 Dec 2022, 22:58

Sadaosh1970 wrote:
30 Dec 2022, 10:55
I deleted the geckdriver.
I've been downloaded again.
Firefox loads, but this error message appears. :(
I was facing this issue but never faced it before this is why I added this error Msg, it seems it is not about creating a new profile, it is a timeout issue driver fails to make receive new session detail and return with an empty response.

This is a geckdriver issue for Firefox 50 link, you can wait for devs to fix geckodriver/FF50 or you can use FF48 or older
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

Sadaosh1970
Posts: 19
Joined: 29 Nov 2022, 06:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Sadaosh1970 » 31 Dec 2022, 06:59

Thanks!
But the Rufaydium version from 03/12/2022 is working normally for me.
Is there a possibility that something else could be causing the error?

automater
Posts: 20
Joined: 01 Jul 2022, 08:51

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by automater » 31 Dec 2022, 07:59

Hi Rufaydium team,

I need some guidance on how to target these buttons please.

In the Accounts.PNG attachment, you'll see on the frontend that there are multiple Accounts (e.g. A-Z Trading Co, Aaron.lims product, etc), and under each account, there are buttons for each country (United States, Canada, and Mexico) which are in a random order for each account.
Accounts.PNG
The buttons on frontend
Accounts.PNG (13 KiB) Viewed 3618 times
I'd like to target buttons by Account name and Country using the text for the Account name and the text for the Country. I've underlined the Account name and Country name text in the HTML screenshot in red and green respectively.
HTML.PNG
The HTML
HTML.PNG (33.01 KiB) Viewed 3618 times
I'd appreciate some guidance on how to target a div by its text, then a button within that div by the button's text.

Thanks!

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 02 Jan 2023, 00:45

automater wrote:
31 Dec 2022, 07:59
Hi Rufaydium team,

I need some guidance on how to target these buttons please.

In the Accounts.PNG attachment, you'll see on the frontend that there are multiple Accounts (e.g. A-Z Trading Co, Aaron.lims product, etc), and under each account, there are buttons for each country (United States, Canada, and Mexico) which are in a random order for each account.Accounts.PNG

I'd like to target buttons by Account name and Country using the text for the Account name and the text for the Country. I've underlined the Account name and Country name text in the HTML screenshot in red and green respectively.HTML.PNG

I'd appreciate some guidance on how to target a div by its text, then a button within that div by the button's text.

Thanks!
You can loop through elements and look for innerText look at this example
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

automater
Posts: 20
Joined: 01 Jul 2022, 08:51

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by automater » 02 Jan 2023, 10:24

Xeo786 wrote:
02 Jan 2023, 00:45
automater wrote:
31 Dec 2022, 07:59
Hi Rufaydium team,

I need some guidance on how to target these buttons please.

In the Accounts.PNG attachment, you'll see on the frontend that there are multiple Accounts (e.g. A-Z Trading Co, Aaron.lims product, etc), and under each account, there are buttons for each country (United States, Canada, and Mexico) which are in a random order for each account.Accounts.PNG

I'd like to target buttons by Account name and Country using the text for the Account name and the text for the Country. I've underlined the Account name and Country name text in the HTML screenshot in red and green respectively.HTML.PNG

I'd appreciate some guidance on how to target a div by its text, then a button within that div by the button's text.

Thanks!
You can loop through elements and look for innerText look at this example
Fantastic! Thank you.

Sadaosh1970
Posts: 19
Joined: 29 Nov 2022, 06:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Sadaosh1970 » 05 Jan 2023, 22:08

Is there any way to save Firefox customizations, such as the folder where the downloaded files will be saved and also if PdF files will be saved or opened by an application?
Tanks in advance.

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 06 Jan 2023, 05:21

Sadaosh1970 wrote:
05 Jan 2023, 22:08
Is there any way to save Firefox customizations, such as the folder where the downloaded files will be saved and also if PdF files will be saved or opened by an application?
Tanks in advance.
Yeah, it's possible with the correct capability "prefs" parameters called browser options for firefox to see Firefox Options,

For download folder it is "browser.download.dir", "D:/FF/downloads/", but I haven't implemented prefs to Rufaydium capabilities yet :think:
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

Sadaosh1970
Posts: 19
Joined: 29 Nov 2022, 06:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Sadaosh1970 » 07 Jan 2023, 05:19

Thanks!!
I will try to understand how this works. ;)

songdg
Posts: 512
Joined: 04 Oct 2017, 20:04

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by songdg » 18 Jan 2023, 01:55

Thanks for this wonderful tool. I have a simple question, how to use google to search "Pele" (send Pele to the input box and click the search button).

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 18 Jan 2023, 03:27

songdg wrote:
18 Jan 2023, 01:55
Thanks for this wonderful tool. I have a simple question, how to use google to search "Pele" (send Pele to the input box and click the search button).
there are many ways and here are few

Code: Select all

#include Rufaydium.ahk
Chrome := new Rufaydium()
Page := Chrome.NewSession()
Page.url := "https://www.google.com/"
Page.querySelectorAll("input")[0].value := "pele"
Page.querySelectorAll("input")[1].sendkey("`n")
msgbox or 
Page.url := "https://www.google.com/"
Page.querySelectorAll("input")[0].value := "pele"
Page.querySelectorAll("input")[1].click()
msgbox or
Page.url := "https://www.google.com/"
input := Page.querySelectorAll("input")
input[0].value := "pele"
input[1].click()
msgbox or
Page.url := "https://www.google.com/"
Page.querySelector("input").sendkey("pele`n")
msgbox, press ok to close session, driver and script
page.Quit()
chrome.Driver.Exit()
exitapp
Rufaydium is simple and easy
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

songdg
Posts: 512
Joined: 04 Oct 2017, 20:04

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by songdg » 20 Jan 2023, 11:26

Xeo786 wrote:
18 Jan 2023, 03:27
songdg wrote:
18 Jan 2023, 01:55
Thanks for this wonderful tool. I have a simple question, how to use google to search "Pele" (send Pele to the input box and click the search button).
there are many ways and here are few

Code: Select all

#include Rufaydium.ahk
Chrome := new Rufaydium()
Page := Chrome.NewSession()
Page.url := "https://www.google.com/"
Page.querySelectorAll("input")[0].value := "pele"
Page.querySelectorAll("input")[1].sendkey("`n")
msgbox or 
Page.url := "https://www.google.com/"
Page.querySelectorAll("input")[0].value := "pele"
Page.querySelectorAll("input")[1].click()
msgbox or
Page.url := "https://www.google.com/"
input := Page.querySelectorAll("input")
input[0].value := "pele"
input[1].click()
msgbox or
Page.url := "https://www.google.com/"
Page.querySelector("input").sendkey("pele`n")
msgbox, press ok to close session, driver and script
page.Quit()
chrome.Driver.Exit()
exitapp
Rufaydium is simple and easy
Thanks, it's quite easy to use. But when I use my local search engine (www.baidu.com), it dosen't work.

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 20 Jan 2023, 12:03

songdg wrote:
20 Jan 2023, 11:26
Thanks, it's quite easy to use. But when I use my local search engine (www.baidu.com), it dosen't work.
You need to find that element from that particular website, to access it, You need to learn the basics of HTML and Javascript, Use the Devtools of the browser in question to read HTML tag elements class and id.
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

songdg
Posts: 512
Joined: 04 Oct 2017, 20:04

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by songdg » 28 Jan 2023, 02:26

Xeo786 wrote:
20 Jan 2023, 12:03
songdg wrote:
20 Jan 2023, 11:26
Thanks, it's quite easy to use. But when I use my local search engine (www.baidu.com), it dosen't work.
You need to find that element from that particular website, to access it, You need to learn the basics of HTML and Javascript, Use the Devtools of the browser in question to read HTML tag elements class and id.
Thanks, any suggestion of books I should read for a crash course.

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 28 Jan 2023, 04:25

songdg wrote:
28 Jan 2023, 02:26
Xeo786 wrote:
20 Jan 2023, 12:03
songdg wrote:
20 Jan 2023, 11:26
Thanks, it's quite easy to use. But when I use my local search engine (www.baidu.com), it dosen't work.
You need to find that element from that particular website, to access it, You need to learn the basics of HTML and Javascript, Use the Devtools of the browser in question to read HTML tag elements class and id.
Thanks, any suggestion of books I should read for a crash course.
no need to read complicated books, start with devtools console and elements and DOM itro, learn how to debug webpage using devtools how to use Java script to access element and data within elements then DOM methods, DOM Document & elements, but you need to there try examples in devtools console,
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

MoUse_G
Posts: 10
Joined: 07 Oct 2021, 00:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by MoUse_G » 30 Jan 2023, 02:54

Hi, does anyone have experience for undetected chromedriver for rufaydium?

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 30 Jan 2023, 03:14

MoUse_G wrote:
30 Jan 2023, 02:54
Hi, does anyone have experience for undetected chromedriver for rufaydium?
Can you please show you code or share snap shot of msg, are you using Settimeout
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

MoUse_G
Posts: 10
Joined: 07 Oct 2021, 00:52

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by MoUse_G » 31 Jan 2023, 01:42

Hi, @Xeo786, I didn't use a Settimeout.
Usually, to test undetected chromedriver from python, go to the link: https://nowsecure.nl
And here is the link for the undetected chromedriver python library: https://pypi.org/project/undetected-chromedriver/2.1.1/

This is my simple script to test undetected chromedriver with rufaydium:

Code: Select all

ChromeDriver := A_ScriptDir "\chromedriver.exe"
Driver := new RunDriver(ChromeDriver)
Chrome := new Rufaydium()

Session := Chrome.NewSession()

url := "https://nowsecure.nl"

Session.Navigate(url)
Session.Maximize()
sleep, 200
return

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

User avatar
Xeo786
Posts: 759
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium WebDriver 1.7.2 (no selenium/websocket)

Post by Xeo786 » 31 Jan 2023, 02:33

MoUse_G wrote:
31 Jan 2023, 01:42
Hi, @Xeo786, I didn't use a Settimeout.
Usually, to test undetected chromedriver from python, go to the link: https://nowsecure.nl
And here is the link for the undetected chromedriver python library: https://pypi.org/project/undetected-chromedriver/2.1.1/

This is my simple script to test undetected chromedriver with rufaydium:

Code: Select all

ChromeDriver := A_ScriptDir "\chromedriver.exe"
Driver := new RunDriver(ChromeDriver)
Chrome := new Rufaydium()

Session := Chrome.NewSession()

url := "https://nowsecure.nl"

Session.Navigate(url)
Session.Maximize()
sleep, 200
return

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
You cannot use RunDriver Class directly? it would work for early version but not work latest,

Code: Select all

Driver := new RunDriver(ChromeDriver)
Now Rufaydium by self configure and Run driver.

1) make sure driver is not running kill driver (i.e. chromedriver) using taskmager. and try following code

Code: Select all

Chrome := new Rufaydium()
Session := Chrome.NewSession()
url := "https://nowsecure.nl"
Session.Navigate(url)
Session.Maximize()
sleep, 200
return
[e]new Rufaydium()[/c] will run Download chromedriver (to a_script_dir) if not available, Run available driver with port 9515, in order to run driver with different port/location or different driver please follow documentation,

for webdriver detection, you should look my this post
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory

Post Reply

Return to “Scripts and Functions (v1)”