I am running my tests against FF 6.0 on virtual Windows XP machine. The winner-line
java -jar selenium-server-standalone-2.5.0.jar -role webdriver -hub http://192.168.1.149:4444/grid/register -port 5558 -host 10.0.2.15 -browser "browserName=firefox, version=6, platform=WINDOWS"
Gives me the following result:
17:53:22.667 INFO - Started SocketListener on 0.0.0.0:5559
17:53:22.667 INFO - Started org.openqa.jetty.jetty.Server#5dccce3c
17:53:22.668 INFO - using the json request : {"class":"org.openqa.grid.common.RegistrationRequest","capabilities":[{" version":"6","browserName":"firefox"," platform":"WINDOWS"}],"configuration":{"port":5559,"host":"192.168.1.135","hubHost":"192.168.1.149","registerCycle":5000,"hub":"http://192.168.1.149:4444/grid/register","url":"http://10.0.2.15:5559/wd/hub","register":true,"singleWindow":"-role","proxy":"org.openqa.grid.selenium.proxy.WebDriverRemoteProxy","maxSession":5,"browser":"browserName=firefox, version=6, platform=WINDOWS","role":"webdriver","hubPort":4444}}
17:53:22.669 INFO - starting auto register thread. Will try to register every 5000 ms.
17:53:22.669 INFO - Registering the node to hub :http://192.168.1.149:4444/grid/register
Unfortunately, it never finishes by
17:53:25.486 INFO - Executing: org.openqa.selenium.remote.server.handler.Status#43a6684f at URL: /status)
17:53:25.488 INFO - Done: /status
It sort of hangs up on the word "register".
Consequently, when running the tests I get an error:
** Erubis 2.6.6
Loaded suite test/selenium/website_smoke_tests
Started
E
Finished in 21.022798 seconds.
1) Error:
test_top_page(WebsiteSmokeTest):
Errno::ETIMEDOUT: Connection timed out - connect(2)
The node is visible on http://192.168.1.149:4444/grid/console.
The problem is solved. It was the error of my connection. Have never gotten the response from Hub to Node on the VM. My bad.
Related
I am using phpStorm IDE with composer and codeception to write selenium acceptance tests in my mac machine.But I couldn't able to run my tests.
I started my Selenium Stand alone jar and chromedriver in my mac machine using the below command.
java -Dwebdriver.chrome.driver="/Users/krishna/Downloads/chromedriverNewChrome" -jar selenium-server-standalone-3.141.59.jar
Below is the console information and not sure if the Chrome driver is running or not.
00:34:19.637 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
00:34:19.722 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444
2019-02-08 00:34:19.777:INFO::main: Logging initialized #348ms to org.seleniumhq.jetty9.util.log.StdErrLog
00:34:19.985 INFO [WebDriverServlet.] - Initialising WebDriverServlet
00:34:20.086 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
<?php
use \AcceptanceTester;
class IndexTest
{
public function _before(AcceptanceTester $I){}
// tests
public function tryToTest(AcceptanceTester $I)
{
$I->amOnUrl('http://codeception.com');
$I->amOnPage('/quickstart'); // moves to http://codeception.com/quickstart
}
}
acceptance.yml file
actor: AcceptanceTester
modules:
enabled:
- WebDriver:
url: 'http://localhost/'
window_size: false # disabled in ChromeDriver
port: 43008
browser: chrome
Running in the following way:
Go to PhpStorm>Run>EditConfiguration>Codeception>Select Type as acceptance tests and run it.
I see following error in the console after I run the tests.
Testing started at 00:50 ...
/usr/bin/php /private/var/folders/4v/cltv5gzs79n6v77b53zw52z00000gn/T/ide-codeception.php run --report -o "reporters: report: PhpStorm_Codeception_ReportPrinter" --no-ansi --no-interaction -c /Users/kabothu/PhpstormProjects/CodeCeptionAutomation/codeception.yml acceptance
Warning: Declaration of PhpStorm_Codeception_ReportPrinter::writeProgress($progress): void should be compatible with PHPUnit\TextUI\ResultPrinter::writeProgress(string $progress): void in /private/var/folders/4v/cltv5gzs79n6v77b53zw52z00000gn/T/ide-codeception_24_70.php on line 2
Codeception PHP Testing Framework v2.5.3
Powered by PHPUnit 7.5.3 by Sebastian Bergmann and contributors.
Running with seed:
Time: 148 ms, Memory: 8.00MB
No tests executed!
Process finished with exit code 0
You named your test class IndexTest, it would work if it extended PhpUnit\Framework\TestCase or Codeception\Test\Unit.
However your test code shows that you wanted to implement test in Cest format,
to get it working you must rename your test class to IndexCestand file to IndexCest.php.
I'm currently trying to run a robotframework test scripts locally (Ubuntu 12.04 LTS 64 bit). The issue that I faced was not able to launch FF browser in Open Browser. Below is the details/specs of the setup that I have.
Firefox (v26.0)
Selenium2Library
selenium-server-standalone-2.53.1.jar
geckodriver-v0.9.0
Please note that I used same machine as hub and node (selenium grid)
Here the command to launch my hub :
java -jar selenium-server-standalone-2.53.1.jar -role hub -port 4444
While here's the command to register my node :
java -jar selenium-server-standalone-2.53.1.jar -role node -hub http://localhost:4444/grid/register -trustAllSSLCertificates
I did what is per told in https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver (add wires executable in the PATH)
I also did :
${ff default caps} Evaluate sys.modules['selenium.webdriver'].common.desired_capabilities.DesiredCapabilities.FIREFOX sys,selenium.webdriver
Set To Dictionary ${ff default caps} marionette=${True}
Create Webdriver Firefox executable_path=\home\my\wires
Open Browser ${HOMEPAGE} ff None ${HUB}
As a result, the FF browser launch, but not opening the URL ${HOMEPAGE}. I've been googling around and stuck in this issue for so long. Please help..
https://github.com/mozilla/geckodriver/releases
firefox version is too low , update to 48 is OK
python 2.7
selenium 3.0.1
geckodriver v0.11.0.exe
firefox 48.0
I am trying to run a mobile web test using appium on Centos 6 headless linux but I am keep getting this error:
"info: [CHROMEDRIVER STDERR] No protocol specified
info: Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"**unknown error: an X display is required for keycode conversions, consider using Xvfb\n** (Session info: chrome=webview)\n (Driver info:chromedriver=2.9.248316,platform=Linux 2.6.32-042stab088.4x86_64)"},"sessionId":"8563fbe5972f3ba87673c7a082d49d22"}
POST /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22/element/0.06753459526225924-1/value 500 1927ms - 395b
debug: Appium request initiated at /wd/hub/session/8563fbe5972f3ba87673c7a082d49d22
debug: Request received with params: {}
info: Shutting down appium session..."
It opens up the chrome browser and navigates to the given url. After that it tries sendKeys to the username field and then it fails.
Please find a possible solution here:
http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/
It works for me on Ubuntu, maybe similar solution works on CentOS.
For some reson I had to start Xvfb with bigger framebuffer
sudo Xvfb :10 -ac -screen 0 4000x2000x8
You need to use xvfb-run to wrap the Appium server call, otherwise Appium will not be able to use the Xvfb server:
xvfb-run appium <server switches>
I'm getting the following error from my TeamCity CI server. The Specflow BDD I'm running works fine locally - the build server has its firewall turned off, All ports open, IE, Firefox and Chrome drivers installed - same result with all 3 drivers. I've set timeouts to 100 seconds, tried putting the thread to sleep without change. Is there a way to run the test manually on the CI server to see what the issue is?
Test(s) failed. OpenQA.Selenium.WebDriverException : The HTTP request to the remote WebDriver server for URL http:// localhost:49227 /session/1647d43b-06dd-4c41-b0b3-2de687f0b7e1/element timed out after 60 seconds.
----> System.Net.WebException : The operation has timed out
at OpenQA.Selenium.Remote.HttpCommandExecutor.CreateResponse(WebRequest request)
I am trying to run a firefox node on ubuntu 12.04. I have 5 x sessions running. If I run the command firefox --display=:1 everything works and I can vnc on to the desktop and see firefox running. Next I have created a plugin for selenium grid2 where I set the capability moz.switches to --display=:1. When I run a test I can see on the node logs that the capability is present however it appears the switch is not getting sent to the firefox command:
11:46:38.603 INFO - Creating a new session for Capabilities [{platform=ANY, webdriver_assume_untrusted_issuer=false, noVNCPort=5901, browserName=firefox, moz.switches=[--display=:1], webdriver_accept_untrusted_certs=true, version=, x=1}]
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
Error: no display specified
I got the moz.switches code from https://github.com/freynaud/grid-spine-selenium/blob/master/src/main/java/com/ebay/spine/LinuxWebDriverVNCProxy.java#L325 but it doesn't seem to be working. Does anyone have any experience writing this type of plugin? I'm a bit stuck really and looking at the selenium code can't see this moz.switches flag nor how I could debug the problem...