Thanks
but I haven't made a release as I haven't tested Opera
Thanks
Code: Select all
chromeOptions := Se["capabilities",This.driver.options]
globalzen wrote: ↑21 May 2022, 09:47Can anyone tell me why I get the error message from the Line 3? Line one seems to work ok I can see the chromedriver task running and monitoring the port.
One thing I notice is that I have Chrome Version 101.0.4951.67 (Official Build) (64-bit) while the download is ChromeDriver 101.0.4951.41.
As soon as line 3 tries to exec it gets the errror message shown.
Code: Select all
; Chrome := new Rufaydium(A_ScriptDir ".\chromedriver.exe") ;path is absolute because of "."
Chrome := new Rufaydium(A_ScriptDir "\chromedriver.exe") ; would work
; but chromedriver.exe is default driver therefore
Chrome := new Rufaydium() ; will also load chromedriver
line 113 returns with all the sessions and their capabilities, and we need to Recreate all sessions againburque505 wrote: ↑21 May 2022, 09:48@Xeo786, thanks once again for all your work on this extremely useful lib. I have a question about line 117 of v1.5.1:What does "Se" refer to?Code: Select all
chromeOptions := Se["capabilities",This.driver.options]
Regards,
burque505
Code: Select all
Sessions := this.send(this.DriverUrl "/sessions","GET")
Maybe we need to downgrade?If you are using Chrome version 101, please download ChromeDriver 101.0.4951.41
Chrome driver 101.0.xxxx driver will work for every Chrome browser 101.0.xxxx unless 102 browser arriveshotcheesesoup wrote: ↑21 May 2022, 16:34@globalzen - I think I'm having the same issue after downloading the newest release on a different computer. Chrome is Version 101.0.4951.67 (Official Build) (64-bit), and I don't know if chromedriver.exe is available for this release yet?
https://chromedriver.chromium.org/downloads says:Maybe we need to downgrade?If you are using Chrome version 101, please download ChromeDriver 101.0.4951.41
@Xeo786 - What do you think?
This will download chromedriver.exe and replace my manual version, but this error just loops.---------------------------
Rufaydium WebDriver Support
---------------------------
session not created: No matching capabilities found
Please Press Yes to download latest driver
---------------------------
Yes No
---------------------------
Code: Select all
Chrome := new Rufaydium()
Page := Chrome.getSessionByUrl("https://www.autohotkey.com/boards/")
if !isobject(page)
{
Page := Chrome.NewSession()
Page.Navigate("https://www.autohotkey.com/boards/")
}
MsgBox % Page.url
. "`nbody len from Basic " Page.QuerySelectorAll("body").length()
. "`nbody len from CDP " Page.cdp.QuerySelectorAll("body").length()
. "`nkeywords len from Basic " Page.QuerySelectorAll("#keywords").length() ; autohkey search
. "`nkeywords len from CDP " Page.cdp.QuerySelectorAll("#keywords").length()
return
Rufaydium working fine.....! just use .count() instead .length() for the time being.Milchmann wrote: ↑23 May 2022, 02:09@Xeo786
Please excuse me for being persistent here.
But I still don't get any values returned since the version from 17.05.22 and also with version 1.6.0.
viewtopic.php?f=6&t=102616&start=120#p463055@ahk7 and @hotcheesesoup Do you get values greater than 0 here ?Code: Select all
Chrome := new Rufaydium() Page := Chrome.getSessionByUrl("https://www.autohotkey.com/boards/") if !isobject(page) { Page := Chrome.NewSession() Page.Navigate("https://www.autohotkey.com/boards/") } MsgBox % Page.url . "`nbody len from Basic " Page.QuerySelectorAll("body").length() . "`nbody len from CDP " Page.cdp.QuerySelectorAll("body").length() . "`nkeywords len from Basic " Page.QuerySelectorAll("#keywords").length() ; autohkey search . "`nkeywords len from CDP " Page.cdp.QuerySelectorAll("#keywords").length() return
Code: Select all
; using AHK Version 1.1.34.02
a := []
msgbox, % "Len:" a.length() "`nKeys:0: " a[0] ; showing Len 0
a[0] := "a"
msgbox, % "Len:" a.length() "`nKeys:0: " a[0] ; showing Len 0 >>> should be 1
a[1] := "b"
msgbox, % "Len:" a.length() "`nKeys:`n0: " a[0] "`n1: " a[1] ; ; showing Len 1 >>> should be 2
a[2] := "c"
msgbox, % "Len:" a.length() "`nKeys:`n0: " a[0] "`n1: " a[1] "`n2: " a[2] ; ; showing Len 2 >>> should be 3
return
Works with basic, not cdp.Rufaydium working fine.....! just use .count() instead .length() for the time being.
In my opinion it has always been with Autohotkey, start with one. Only Javascript started with 0.here is the issue
Code: Select all
oCells := oRows[A_Index-1].querySelectorAll("td")
If you getting elements not element then .count() should work, please show me the code.Milchmann wrote: ↑23 May 2022, 04:00Works with basic, not cdp.Rufaydium working fine.....! just use .count() instead .length() for the time being.
Is .count now permanent or just an interim solution?In my opinion it has always been with Autohotkey, start with one. Only Javascript started with 0.here is the issue
https://www.autohotkey.com/docs/Objects.htm#Usage_Simple_Arrays
I myself, also set A_index-1 in Autohotkey when working with javascript.Code: Select all
oCells := oRows[A_Index-1].querySelectorAll("td")
If you getting elements not element then .count() should work, please show me the code.
Code: Select all
Chrome := new Rufaydium("chromedriver.exe")
Page := Chrome.getSessionByUrl("https://www.autohotkey.com/boards/")
if !isobject(page)
{
Page := Chrome.NewSession()
Page.Navigate("https://www.autohotkey.com/boards/")
}
Page.CDP.Document()
MsgBox % Page.url
. "`nbody len from Basic " Page.QuerySelectorAll("body").count()
. "`nbody len from CDP " Page.cdp.QuerySelectorAll("body").count()
. "`nkeywords len from Basic " Page.QuerySelectorAll("#keywords").count() ; autohotkey search
. "`nkeywords len from CDP " Page.cdp.QuerySelectorAll("#keywords").count()
Page.QuerySelector("#keywords").sendkey("ABC/")
Page.cdp.QuerySelector("#keywords").sendkey("CDP") ; error
msgbox % "`nkeywords value from Basic : " Page.QuerySelector("#keywords").value
. "`nkeywords value from CDP: " Page.cdp.QuerySelector("#keywords").value
. "`nkeywords value from Evaluate: " Page.CDP.Evaluate("document.querySelector('#keywords').value;").value "`n"
. "`nkeywords outerHTML from CDP : `n" Page.cdp.QuerySelector("#keywords").outerHTML "`n`n"
. "`nkeywords outerHTML from Evaluate : `n" Page.CDP.Evaluate("document.querySelector('#keywords').outerHTML;").value
Oh CDP was not working just because of this bugMilchmann wrote: ↑24 May 2022, 01:52@Xeo786If you getting elements not element then .count() should work, please show me the code.Tested with your version from yesterday. Please test yourself. Before 17.05.22 I got the values ( incl. . length() and except basic.value and cdp.value ).Code: Select all
Chrome := new Rufaydium("chromedriver.exe") Page := Chrome.getSessionByUrl("https://www.autohotkey.com/boards/") if !isobject(page) { Page := Chrome.NewSession() Page.Navigate("https://www.autohotkey.com/boards/") } Page.CDP.Document() MsgBox % Page.url . "`nbody len from Basic " Page.QuerySelectorAll("body").count() . "`nbody len from CDP " Page.cdp.QuerySelectorAll("body").count() . "`nkeywords len from Basic " Page.QuerySelectorAll("#keywords").count() ; autohotkey search . "`nkeywords len from CDP " Page.cdp.QuerySelectorAll("#keywords").count() Page.QuerySelector("#keywords").sendkey("ABC/") Page.cdp.QuerySelector("#keywords").sendkey("CDP") ; error msgbox % "`nkeywords value from Basic : " Page.QuerySelector("#keywords").value . "`nkeywords value from CDP: " Page.cdp.QuerySelector("#keywords").value . "`nkeywords value from Evaluate: " Page.CDP.Evaluate("document.querySelector('#keywords').value;").value "`n" . "`nkeywords outerHTML from CDP : `n" Page.cdp.QuerySelector("#keywords").outerHTML "`n`n" . "`nkeywords outerHTML from Evaluate : `n" Page.CDP.Evaluate("document.querySelector('#keywords').outerHTML;").value
Thanks.Oh CDP was not working just because of this bug
Thanks for pointing out, line 223 in rufaydium.ahk was saying switch this.name it should be switch i.name, I just fixed Main Repo.
I think this is documented behavior, you can find a bit more in the documentation.Xeo786 wrote: ↑23 May 2022, 02:49above behavior must be some bug.Code: Select all
; using AHK Version 1.1.34.02 a := [] msgbox, % "Len:" a.length() "`nKeys:0: " a[0] ; showing Len 0 a[0] := "a" msgbox, % "Len:" a.length() "`nKeys:0: " a[0] ; showing Len 0 >>> should be 1 a[1] := "b" msgbox, % "Len:" a.length() "`nKeys:`n0: " a[0] "`n1: " a[1] ; ; showing Len 1 >>> should be 2 a[2] := "c" msgbox, % "Len:" a.length() "`nKeys:`n0: " a[0] "`n1: " a[1] "`n2: " a[2] ; ; showing Len 2 >>> should be 3 return
@RaptorX