You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whether you are using a local path to the XPI file, which as best should be absolute, or you have to read the contents of the XPI file first before calling base64 related methods.
Note that the above just assumes that the path to the XPI is base64('a.xpi').
Yes, I am using an absolute path xx. xpi (D: \ xx. xpi) file. I would like to know how to pass the value of path in the request parameters {"path": "", "temporary": true} for the POST/session/{session id}/moz/add/install method. I have obtained the value corresponding to the path through this method now.
Extension_zip_path='D: \ \ xx. xpi '
Profile=Firefox Profile()
Profile. add_extension (extension_zip_path)
Driver=webdriver Remote (command_executor=command_executor, desired capabilities=capabilities, options=options, profile=profile)
Then take out functionalities. get ('alwaysMatch '). get ('moz: firefoxOptions'). get ('pfofile') and assign it to the path
System
Version: firefox 82.0 and 124.0.2 (64 位)
Platform: Windows 10 and Linux
Firefox:
Selenium: 3.141.0 and seleniod 1.10.7 geckodriver-v0.33.0-win64
Testcase
POST /session/{session id}/moz/addon/install to install an extension [Gecko only]
request Body:
{"path": "base64('a.xpi')", "temporary":true}
Stacktrace
{
"value": {
"error": "unknown error",
"message": "Expected absolute path: [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.initWithPath]" nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)" location: "JS frame :: chrome://remote/content/marionette/addon.sys.mjs :: install :: line 72" data: no]",
"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8\nWebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:192:5\nUnknownError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:816:5\ninstall@chrome://remote/content/marionette/addon.sys.mjs:74:13\nGeckoDriver.prototype.installAddon@chrome://remote/content/marionette/driver.sys.mjs:2954:21\ndespatch@chrome://remote/content/marionette/server.sys.mjs:318:40\nexecute@chrome://remote/content/marionette/server.sys.mjs:289:16\nonPacket/<@chrome://remote/content/marionette/server.sys.mjs:262:20\nonPacket@chrome://remote/content/marionette/server.sys.mjs:263:9\n_onJSONObjectReady/<@chrome://remote/content/marionette/transport.sys.mjs:494:20\n"
}
}
Trace-level log
The text was updated successfully, but these errors were encountered: