Rufaydium V2.1a

Post your working scripts, libraries and tools.
User avatar
Xeo786
Posts: 760
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Rufaydium V2.1a

20 Jan 2023, 07:03

Rufaydium-Webdriver V2 Alpha
Rufaydium is a WebDriver Library for AutoHotkey V2 working only for chrome browser/chromeDriver for now. User have to download chromedriver.exe

You can find Rufaydium V2 Beta Here

GitHub
Same V1 repository link with "AHKV2" branch

Live JS bridge
Element.ahk aka Webdriver element all methods and properties from Webdriver have been pre-defined, Undefined properties and Call method will be executed directly to Session Active Tab's JavaScript console.

Code: Select all

Chrome := Rufaydium() ; 
Page := Chrome.NewSession()
Page.url := "https://www.autohotkey.com/boards"
Ele1 := Page.querySelector("#search-box") ; get element from document
ele :=  Ele1.querySelector("#keywords") ; get element from element
ele.focus() ; this method is not been defined in element.ahk therefore will be called into JS console

X := "12345"
ele.value := X ; value is undefined property will be __Set the value of element in question using JS execution

ele.abc := '["a","b"]' ; this array is going to set inside JavaScript >> this ["a","b"] AHK array so it will throw error
msgbox ele.abc[0] ; __get "abc[0]" using JS console
ele.abc[0] := "c" ; __set "abc[0]" using JS console
msgbox ele.abc[0]

page.Quit() ; close page
Chrome.driver.Exit() ; close driver
exitapp
Edit:
Capabilities.ahk added
Last edited by Xeo786 on 02 Apr 2024, 14:53, edited 1 time in total.
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
kairushinjuu
Posts: 46
Joined: 07 May 2020, 07:02

Re: Rufaydium V2.1a

05 May 2023, 19:30

Hello, was just wondering if you could explain how to deal with checkboxes, I tried "click()" but it came back with an integer expected error
this is the html for the element in question

Code: Select all

<input type="checkbox" class="create-terms__input" name="agree_terms" value="1" tabindex="7" required="">
changing the "value" doesn't seem to change it to checked. Any help would be appreciated :D

Thank you
User avatar
Xeo786
Posts: 760
Joined: 09 Nov 2015, 02:43
Location: Karachi, Pakistan

Re: Rufaydium V2.1a

06 May 2023, 12:22

kairushinjuu wrote:
05 May 2023, 19:30
Hello, was just wondering if you could explain how to deal with checkboxes, I tried "click()" but it came back with an integer expected error
this is the html for the element in question

Code: Select all

<input type="checkbox" class="create-terms__input" name="agree_terms" value="1" tabindex="7" required="">
changing the "value" doesn't seem to change it to checked. Any help would be appreciated :D

Thank you
have you tried element.click()
"When there is no gravity, there is absolute vacuum and light travel with no time" -Game changer theory
setered
Posts: 1
Joined: 14 Jun 2023, 23:43

Re: Rufaydium V2.1a

15 Jun 2023, 00:08

Hello. I ran your example and received:

Error: (126) The specified module could not be found.

143: {
144: If !(module := DllCall('LoadLibrary', 'str', path, 'ptr'))
▶ 145: Throw OSError(A_LastError)
146: module_load_addr := DllCall('GetProcAddress', 'ptr', module, 'astr', 'ahk2_module_load', 'ptr') || DllCall('GetProcAddress', 'ptr', module, 'ptr', 1, 'ptr')
147: If !module_load_addr

Call stack:
\AutoHotkey\Lib\Rufaydium\JSON\Native.ahk (145) : [Native.LoadModule] Throw OSError(A_LastError)
\AutoHotkey\Lib\Rufaydium\JSON.ahk (8) : [JSON.__New] Native.LoadModule('.\JSON\' (A_PtrSize * 8) 'bit\ahk-json.dll', ['JSON'])
\AutoHotkey\Lib\Rufaydium\JSON.ahk (6) : [] JSON

How to me to correct it? I am a beginner in AHK.

Return to “Scripts and Functions (v2)”

Who is online

Users browsing this forum: Archimede, dogbar492 and 28 guests