Skip to content

Conversation

@stof
Copy link
Member

@stof stof commented Oct 10, 2018

On Trusty, the preinstalled Firefox version is newer than the latest version supported by the FirefoxDriver of Selenium 2, and requires using the W3C protocol. But we don't support this protocol yet.

Replaces #290

On Trusty, the preinstalled Firefox version is newer than the latest version
supported by the FirefoxDriver of Selenium 2, and requires using the W3C
protocol. But we don't support this protocol yet.
@stof
Copy link
Member Author

stof commented Oct 10, 2018

This also uses Selenium 3 rather than Selenium 2 for most jobs, as Selenium 2 is not maintained anymore.

@aik099
Copy link
Member

aik099 commented Oct 10, 2018

OK.

@stof
Copy link
Member Author

stof commented Oct 10, 2018

OK, chrome is crashing, but I have an idea why.

@aik099
Copy link
Member

aik099 commented Oct 10, 2018

Try using that scenario (that selenium verison, that chrome version) locally. Maybe you'll see what's actually happening, e.g. Chrome window opens and then closes after a specific test. Maybe we're attempting to connect before Chrome was able to start.

@stof
Copy link
Member Author

stof commented Oct 10, 2018

@aik099 I know what happens. Chrome's sandbox is enabled by default, but it is not compatible with Travis's container setup (containers are not priviledged enough to enable the sandboxing). And currently, Selenium2Driver does not auto-detect Travis to disable the chrome sandbox. It requires users to manually specify it.

We have 2 choices:

  • adding the feature of automatically detecting Travis to disable the sandbox (if not done explicitly already)
  • disabling it only in our testsuite.

what do you prefer ?

@stof
Copy link
Member Author

stof commented Oct 10, 2018

I will need to debug the build, as it fails many things and takes a very long time

@aik099
Copy link
Member

aik099 commented Oct 10, 2018

According to https://stackoverflow.com/questions/33013378/how-can-we-disable-web-security-of-chrome-browser-using-selenium-testng disabling sandboxing is done via capabilities during driver creation. If that is so, then we can:

  1. create an option in phpunit.xml.dist for chrome sandboxing (not set by default = use whatever happens currently)
  2. when creating a driver we pick that option and set correct capabilities
  3. in the travis.yml we always disable sandboxing by packing phpunit.xml.dist file

@stof
Copy link
Member Author

stof commented Oct 10, 2018

Well, for now, I made a solution only for our own testsuite (so no impact on our users yet, which would be discussed separately once our CI works again), detecting Travis.

@aik099 aik099 mentioned this pull request Jan 4, 2019
@mvorisek
Copy link
Contributor

This is 2 years old, I belive it can be closed now.

@oleg-andreyev
Copy link
Contributor

@mvorisek maybe it worth a look at https://github.com/oleg-andreyev/MinkPhpWebDriver

@stof stof closed this Oct 12, 2021
@stof stof deleted the use_chrome branch October 12, 2021 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants