TestProject Forum
Powered by leading experts in the test automation community

Web Extension: failing adding Cookies

Hi,

I need to set Cookies for Testing. Currently I’m using the latest Agent and I added the Web Extension addon to do this. The Browsers are up to date.

Adding a Cookie is successful in Chrome, but fails in Firefox and MS Edge.

Unfortunately there is no clear error message (at least for me) why the Cookie addition failed. Is this functionality not added for Firefox and Edge? Or is this error due to the SameSite attribute for the Cookie can’t be set?

Any help is apreciated!
Christoph

Hello @christoph.guse
Can you please check the reports of the tests on IE and FF and see what the failure reason is.

Hi @ran.tzur,

sure!

Message for MS Edge:

The command failed to set the specified cookie value.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MSEDGEWIN10', ip: '127.0.0.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.1'
Driver info: io.testproject.java.sdk.v2.drivers.WebDriver
Capabilities {acceptInsecureCerts: false, browserName: MicrosoftEdge, browserVersion: 44.17763.1.0, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: {proxyType=UNSPECIFIED, aut..., setWindowRect: false, timeouts: {implicit=0.0, pageLoad=300..., webdriver.remote.sessionid: CCBE4D3F-0DBC-436F-8D1A-823...}
Session ID: CCBE4D3F-0DBC-436F-8D1A-823A2B9B6532

Message for Firefox:

Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MSEDGEWIN10', ip: '127.0.0.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '13.0.1'
Driver info: io.testproject.java.sdk.v2.drivers.WebDriver
Capabilities {acceptInsecureCerts: true, browserName: firefox, browserVersion: 79.0, javascriptEnabled: true, moz:accessibilityChecks: false, moz:buildID: 20200720193547, moz:geckodriverVersion: 0.27.0, moz:headless: false, moz:processID: 6896.0, moz:profile: C:\Users\IEUser\AppData\Loc..., moz:shutdownTimeout: 60000.0, moz:useNonSpecCompliantPointerOrigin: false, moz:webdriverClick: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, platformVersion: 10.0, rotatable: false, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit=0.0, pageLoad=300..., unhandledPromptBehavior: dismiss and notify, webdriver.remote.sessionid: fa0c47d3-b23e-4a25-9040-a4a...}
Session ID: fa0c47d3-b23e-4a25-9040-a4ae0ac978b0

Does this help?

To move on I started setting the Cookie value using Javascript. This seems to work properly even in MS Edge and Firefox.

Cheers,
Christoph