I have the following error while calling Selenium function SetCapability from Autohotkey
Code: Select all
Error: 0x80131500 -
Source: Selenium
Description: Selenium.Serializer.JsonException
Line 190 in JSON.cs
Object of type __ComObject is not serializable
HelpFile: (null)
Helpcontext: 0
Specifically: Get
Line #
015: driver := ComObjCreate("Selenium.ChromeDriver")
018: driver.SetCapability("debuggerAddress", "127.0.0.1:9222")
021: userAgent := "Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Mobile Safari/537.36"
022: deviceMetrics := {width: 360
, height: 640
, pixelRatio: 3
, touch: true }
027: driver.SetCapability("mobileEmulation", {deviceName: "iPhone 6/7/8 Plus"
, deviceMetrics: deviceMetrics
, userAgent: userAgent})
031: driver.Get("...") ;; Broken Link for safety
Thanks!