mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.03k stars 1.51k forks source link

Firefox: Do you allow any automation tool to access iframe? Or allow to change origin in test? #2041

Closed faith-berroya closed 1 year ago

faith-berroya commented 1 year ago

Do you allow any automation tool to access iframe document and also be able to test cross origin? I have tests that:

  1. Need to interact with an iframe Cypress: How can we bypass cross origin error in Firefox? (iframes)
  2. Have to change origin while running inside the test Cypress: How can we bypass cross origin error in Firefox? (cross origin issue, outside cy.origin)

Both of tests are currently run in Cypress and is only failing in Firefox due to cross origin issue (Firefox does not allow change of origin, or access iFrame document)

It runs perfectly in Chrome, Edge and Electron with these configuration in cypress.config.js:

chromeWebSecurity: false,
experimentalSessionAndOrigin: true,
whimboo commented 1 year ago
1. Need to interact with an iframe [Cypress: How can we bypass cross origin error in Firefox? (iframes)](https://stackoverflow.com/questions/73214884/cypress-how-can-we-bypass-cross-origin-error-in-firefox-iframes)

Please give some clear details about test steps. Especially if you are using the Switch to frame command of WebDriver classic to actually switch to the frame you want to work with. I seems like you aren't doing it?

2. Have to change origin while running inside the test [Cypress: How can we bypass cross origin error in Firefox? (cross origin issue, outside cy.origin)](https://stackoverflow.com/questions/73216608/cypress-how-can-we-bypass-cross-origin-error-in-firefox-cross-origin-issue-o)

Which command is it that is failing here? Or which commands are you executing in order? It would be great to get some trace logs for investigation.

whimboo commented 1 year ago

No feedback from reporter. Closing the issue.