{"action":"created","issue":{"url":"https://api.github.com/repos/Modelizer/Selenium/issues/15","repository_url":"https://api.github.com/repos/Modelizer/Selenium","labels_url":"https://api.github.com/repos/Modelizer/Selenium/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/Modelizer/Selenium/issues/15/comments","events_url":"https://api.github.com/repos/Modelizer/Selenium/issues/15/events","html_url":"https://github.com/Modelizer/Selenium/issues/15","id":180062495,"number":15,"title":"Tests not hitting APP_URL value - instead going to localhost","user":{"login":"haakym","id":832687,"avatar_url":"https://avatars.githubusercontent.com/u/832687?v=3","gravatar_id":"","url":"https://api.github.com/users/haakym","html_url":"https://github.com/haakym","followers_url":"https://api.github.com/users/haakym/followers","following_url":"https://api.github.com/users/haakym/following{/other_user}","gists_url":"https://api.github.com/users/haakym/gists{/gist_id}","starred_url":"https://api.github.com/users/haakym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haakym/subscriptions","organizations_url":"https://api.github.com/users/haakym/orgs","repos_url":"https://api.github.com/users/haakym/repos","events_url":"https://api.github.com/users/haakym/events{/privacy}","received_events_url":"https://api.github.com/users/haakym/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-29T14:19:26Z","updated_at":"2016-09-30T10:11:48Z","closed_at":null,"body":"Hi. Firstly, great idea for a package I look forward to seeing it develop further!\r\n\r\nI'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.\r\n\r\nI've added the following values to my `.env` file:\r\n\r\nAPP_URL=\"http://modelizer-selenium.dev/\"\r\nSELENIUM_WIDTH=1024\r\nSELENIUM_HEIGHT=768\r\n\r\nThen 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:\r\n\r\n```\r\nC:\\laragon\\www\\modelizer-selenium (master) 29/09/2016 14:57:15.43                                                                     \r\nλ phpunit                                                                                                                             \r\nPHPUnit 5.5.5 by Sebastian Bergmann and contributors.                                                                                 \r\n                                                                                                                                      \r\n.E                                                                  2 / 2 (100%)                                                      \r\n                                                                                                                                      \r\nTime: 318 ms, Memory: 8.00MB                                                                                                          \r\n                                                                                                                                      \r\nThere was 1 error:                                                                                                                    \r\n                                                                                                                                      \r\n1) SeleniumExampleTest::testBasicExample                                                                                              \r\nPHPUnit_Extensions_Selenium2TestCase_Exception: JSON decoding of remote response failed.                                              \r\nError code: 4                                                                                                                         \r\nThe response: '<!DOCTYPE html>                                                                                                        \r\n<html>                                                                                                                                \r\n    <head>                                                                                                                            \r\n        <title>Laragon</title                                                                                                        \r\n    </head>                                                                                                                           \r\n    <body>                                                                                                                            \r\n        <div class=\"container\">                                                                                                       \r\n            <div class=\"content\">                                                                                                     \r\n                <div class=\"title\" title=\"Laragon\">Laragon</div>                                                                      \r\n                                                                                                                                      \r\n                <div class=\"info\"><br />                                                                                              \r\n                      Apache/2.4.23 (Win32) mod_authnz_sspi/0.1.0 OpenSSL/1.0.2h PHP/7.0.10<br />                                     \r\n                      PHP version: 7.0.10   <span><a title=\"phpinfo()\" href=\"/?q=info\">info</a></span><br />                          \r\n                      Document Root: C:/laragon/www<br />                                                                             \r\n                                                                                                                                      \r\n                </div>                                                                                                                \r\n                <div class=\"opt\">                                                                                                     \r\n                  <div><a title=\"Getting Started\" href=\"http://laragon.org/?q=getting-started\">Getting Started</a></div>              \r\n                </div>                                                                                                                \r\n            </div>                                                                                                                    \r\n                                                                                                                                      \r\n        </div>                                                                                                                        \r\n    </body>                                                                                                                           \r\n</html>'                                                                                                                              \r\n                                                                                                                                      \r\n                                                                                                                                      \r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase\\Driver.php:142                 \r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase\\Driver.php:71                  \r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase\\SessionStrategy\\Isolated.php:67\r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase.php:296                        \r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase.php:337                        \r\nC:\\laragon\\www\\modelizer-selenium\\vendor\\phpunit\\phpunit-selenium\\PHPUnit\\Extensions\\Selenium2TestCase.php:314                        \r\nC:\\Users\\djones.SACBUK\\AppData\\Roaming\\Composer\\vendor\\phpunit\\phpunit\\src\\TextUI\\Command.php:162                                     \r\nC:\\Users\\djones.SACBUK\\AppData\\Roaming\\Composer\\vendor\\phpunit\\phpunit\\src\\TextUI\\Command.php:113                                     \r\n                                                                                                                                      \r\nERRORS!                                                                                                                               \r\nTests: 2, Assertions: 2, Errors: 1.                                                                                                   \r\n```\r\n\r\nI also tried adding the following to my phpunit.xml:\r\n\r\n```\r\n<env name=\"APP_URL\" value=\"http://modelizer-selenium.dev/\"/>\r\n```\r\n\r\nthis to my tests/TestCase.php:\r\n\r\n```\r\nprotected $baseUrl = 'http://modelizer-selenium.dev';\r\n```\r\n\r\nThe failing test looks like this:\r\n\r\n```\r\n    public function testBasicExample()\r\n    {\r\n        // This is a sample code you can change as per your current scenario\r\n        $this->visit('/')\r\n             ->see('Laravel')\r\n             ->hold(3);\r\n    }\r\n```\r\n\r\nAny ideas? Thanks!"},"comment":{"url":"https://api.github.com/repos/Modelizer/Selenium/issues/comments/250709241","html_url":"https://github.com/Modelizer/Selenium/issues/15#issuecomment-250709241","issue_url":"https://api.github.com/repos/Modelizer/Selenium/issues/15","id":250709241,"user":{"login":"haakym","id":832687,"avatar_url":"https://avatars.githubusercontent.com/u/832687?v=3","gravatar_id":"","url":"https://api.github.com/users/haakym","html_url":"https://github.com/haakym","followers_url":"https://api.github.com/users/haakym/followers","following_url":"https://api.github.com/users/haakym/following{/other_user}","gists_url":"https://api.github.com/users/haakym/gists{/gist_id}","starred_url":"https://api.github.com/users/haakym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haakym/subscriptions","organizations_url":"https://api.github.com/users/haakym/orgs","repos_url":"https://api.github.com/users/haakym/repos","events_url":"https://api.github.com/users/haakym/events{/privacy}","received_events_url":"https://api.github.com/users/haakym/received_events","type":"User","site_admin":false},"created_at":"2016-09-30T10:11:48Z","updated_at":"2016-09-30T10:11:48Z","body":"@Modelizer \r\n\r\nThanks for your reply! I'm not sure you fully understood my issue, I will try to explain in more detail.\r\n\r\nThe 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 `http://localhost`.\r\n\r\nI thought the issue was related to the baseUrl because it was going to `http://localhost` instead of my desired URL: `http://modelizer-selenium.dev`\r\n\r\n\r\nAfter googling some of the output after running `phpunit` I now believe the issue is related to the chrome webdriver and proxy settings (I'm behind a proxy at my work place), as others were having issues using codeception and the chrome webdriver here: https://github.com/Codeception/Codeception/issues/3042 and here https://github.com/Codeception/Codeception/issues/2651\r\n\r\nHow would I be able to set the proxy settings to resolve this issue?"}}
{"actor":{"display_login":"haakym"}}