-
Notifications
You must be signed in to change notification settings - Fork 33
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
Tests not hitting APP_URL in proxy environment #15
Comments
Related? If this is an issue with proxy settings, how or where can I set them? |
Thanks a lot @haakym
Then test will fail because it's looking for Also, it seems the problem is not related to baseUrl because phpunit is not able to decode json Also, your tag at |
Thanks for your reply! I'm not sure you fully understood my issue, I will try to explain in more detail. The test fails because it's hitting the wrong URL which gives different content to what is expected. I'm using a WAMP app called Laragon and that's the splash page which is shown at I thought the issue was related to the baseUrl because it was going to After googling some of the output after running How would I be able to set the proxy settings to resolve this issue? |
Okay. What if we provide an option which will be loaded when selenium server is started. Will this help you? This issue is new for me correct me if I'm wrong :) |
Sorry for the late reply.
Yes, that looks good! To be honest, it's new for me too. |
@Modelizer - awesome, I'll give this a try soon and will be sure to give feedback |
closing this issue for now. |
@Modelizer I've done the following...
now if I go to
Modelizer\Selenium\SeleniumServiceProvider::class,
public function testBasicExample()
{
// This is a sample code you can change as per your current scenario
$this->visit('/')
->see('Laravel')
->hold(3);
}
<?php
return [
'proxyInjectionMode' => true
]; Unsure I am doing the correct thing here?
When running
Any suggestions would be appreciated. Thank you very much! |
ping @jhoopes @chrispecoraro Have you guys have any idea what is going on? 🤔 I think if we able to pass a correct |
Just to add some further context if you didn't read my first few posts on this issue, I am using this package at work where we're behind a proxy and thought this was causing the issue as googling similar errors brought up results related to proxy settings for selenium? |
@haakym try removing the trailing forward slash from the APP_URL... APP_URL="http://seleniumtest.dev/" => APP_URL="http://seleniumtest.dev" |
Upgrading to 2.0 should solve this problem. |
Hi. Firstly, great idea for a package I look forward to seeing it develop further!
I'm developing locally using Laragon on Windows 7 for which I used to start up a fresh install of Laravel 5.3 and pulled in the package and then followed the installation instructions from the readme.
I've added the following values to my
.env
file:APP_URL="http://modelizer-selenium.dev/"
SELENIUM_WIDTH=1024
SELENIUM_HEIGHT=768
Then when I run the selenium server and phpunit it hits localhost and not http://modelizer-selenium.dev/, this is what I've got in the console which is the Laragon splash page which is returned when you hit localhost:
I also tried adding the following to my phpunit.xml:
this to my tests/TestCase.php:
The failing test looks like this:
Any ideas? Thanks!
The text was updated successfully, but these errors were encountered: