@Xeo786
Thank you, changing the session pointer to "document" was a great tip.
@ahk7
Thanks to you as well, it works well.
I am wondering if you can help me with another simple thing regarding clicking a button (it links to another webpage) specifically using getElementById.
The element in Chrome (cut it off at href ,sorry can't share the webpage):
<a id="205123" class="s-receiveButton rollover button " href......
When I type the following into the Chrome Console (or using is with AHK with IE) the button works:
Console:
Code: Select all
document.getElementById("205123").click()
AHK with IE (wb is the pointer):
Code: Select all
wb.document.getElementById("205123").click()
However I am having difficulty making it work with Rufaydium:
Code: Select all
#SingleInstance, Force
#Include Rufaydium.ahk
Chrome := new Rufaydium("chromedriver.exe")
document := Chrome.NewSession()
return
;I then navigate to the webpage the element is on and press the hotkey below
`::
Element := document.getElementById("205123")
Element.click()
return
I'm, curious where I am going wrong here.
If it's unwieldly dealing with my example, could an example be demonstrated using another webpage so I can learn from it. Thanks.