Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit-Selenium FirefoxProfile settings #348

Open
deepseerha opened this issue Aug 18, 2015 · 1 comment
Open

PHPUnit-Selenium FirefoxProfile settings #348

deepseerha opened this issue Aug 18, 2015 · 1 comment

Comments

@deepseerha
Copy link

I am getting a "Bad request" exception when starting a test run with Selenium WebDriver in Firefox. I traced this problem to hosts config file (using Linux). The hosts file on my machine has this line

127.0.0.1 something localhost

This works fine when I update hosts file as below

127.0.0.1 localhost something

But I cannot change this file. I found an issue related to this,

https://code.google.com/p/selenium/issues/detail?id=3280

People suggested solution for this as

profile.setPreference(FirefoxProfile.ALLOWED_HOSTS_PREFERENCE, "something");

Can you please let me know how we can fix this issue with phpunit-selenium framework ?

@giorgiosironi
Copy link
Owner

I think this kind of information has to be passed inside the desidered capabilities when you create a new session:
https://github.com/giorgiosironi/phpunit-selenium/blob/a6fdffdd56f4884ef39e09a9c62e5e4eb273e42c/Tests/Selenium2TestCase/CustomDesiredCapabilitiesTest.php
Here it is explained how with the Java API, but it should be the same by passing it with the REST API that phpunit-selenium uses to talk with the Selenium Server:
http://stackoverflow.com/a/17032649

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

No branches or pull requests

2 participants