To run selenium server - selenium-rc

When I try to run server(rc) in command prompt it is saying it is already used. So, I run the server in 5555 and changed the same in script. However, it still shows
WARN - Failed to start: SocketListener0#0.0.0.0:4444

Have you tried to stop the server using the below link?
http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
Just open the above link in the browser you are using to run the tests.
After the opening the above link, the selenium server stops.
Then you can proceed with starting the server from port 4444.

Close the browser that is running on port 4444 and then restart the selenium server

I had the same problem,
type this instead
webdriver-manager --seleniumPort 4455 start
it will start it on port 4455 (you can try different numbers as well)

Related

How can I determine which localhost port is running?

I just find out that when I simply type 'localhost' in the url without anything more in the path, the browser displays a message from a local backend test project in Express that I've made days ago.
I'm trying to stop this process.
I was sure that to have started this server on port 3001 but when I try to kill it , it says that there is no process running on this port.
I tried to kill 8080 as well, but the message is still displayed.
Obviously, I refreshed the page, I tried on several different browser, even restarted my computer.
How can i determine which port is running?
How can I stop the process?
[Edit]:
Here's what I keep receiving :
<html><head></head><body><h1>It works!</h1>
</body></html>
You could use lsof:
lsof -i #localhost
Can you try this command :
sudo lsof -nP -i4TCP:80

Can start ChromeDriver within CLI tool but won't allow connections

I'm using Laravel homestead and I'm writing a little artisan command line tool that I need to browse my site with javascript execution.
I run dusk test regularly with no difficulty, so I thought I would use Laravel's tools for this script.
I started out by running this early in my script:
\Laravel\Dusk\TestCase::startChromeDriver();
This started the driver fine running on port 9515 running as user vagrant (default homestead user)
But when I tried to access it (also from within the script) I would get an error:
Failed to connect to localhost port 9515: Connection refused
If I instead started it manually on the command line:
$ ./vendor/laravel/dusk/bin/chromedriver-linux --port=9515
The driver started fine again running on port 9515 as user vagrant, but this time my tool runs fine.
But I really want to be able to start the ChromeDriver from within the tool. So I also tried:
$process = new \Symfony\Component\Process\Process('./vendor/laravel/dusk/bin/chromedriver-linux --port=9515');
$process->start();
Connection was refused again.
Any idea why this works when I start it from the command line but not within my artisan command?
I can't explain why this makes a difference but it has. If I launch the driver with the full path:
/home/vagrant/Code/mysite/vendor/laravel/dusk/bin/chromedriver-linux --port=8888
all works fine now.

Cannot run styleguidist along side with laravel development server

I am trying to document my React Components and I am running styleguidist server along side with Laravel development server but the styleguidist server crashes with this error.
You have another server running at port 6060 somewhere, shut it down first
You can change the port using the `serverPort` option in your style guide config:
https://react-styleguidist.js.org/docs/configuration.html
I have configured the styleguidist server to run at port 6060 as to resolve this issue and succeeded to run the server only once. After that I am getting this issue again.
How can i resolve this??
The error is saying you have something else running at that port. Have you tried a different one? If you are running a UNIX system, you can see what is running on that port with:
lsof -i tcp:6060

forwarding error while running on selenium grid

All of a sudden I am confused with selenium grid.
I ran selenium grid with 2 nodes on a windows machine.
Now, I try to run the test from a remote machine on this. It says forwarding error. But if I change the port to 5555, it runs fine. I have tried using the port option while configuring hub. That doesn't work either. Please help me out.
I'll try to help you but I need more details. If I understand you right:
the hub is started on machine_1 (say on default port 4444)
the nodes are started on machine_2, running something like this:
java -jar selenium-server-standalone-2.28.0.jar -role node -hub http://ip_of_machine_1:4444/grid/register -browser "browserName=chrome,maxInstances=5" -port the_port_number (the default is 5555)
you try to run the tests and get forwarding error
Actually this should work. Could you give some more details?

Has anybody run Xvfb on EC2 with CentOS?

I am trying to get javascript-enabled cucumber running on CentOS in EC2 by following this tutorial: http://makandra.com/notes/1391-how-to-hide-your-selenium-browser-window-with-headless However, the scenarios that require javascript just fail without any exception message.
In order to debug, I just went to see if Xvfb is working correctly with according to this tutorial: http://blog.kabisa.nl/2010/05/24/headless-cucumbers-and-capybaras-with-selenium-and-hudson/
I tested the command:
Xvfb :99 -ac -screen 0 1024x768x16
I got the error msg like this:
_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/ip-10-116-82-44:99
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
I googled for solutions about of these errors. I haven't found a good solution for this yet. If I run the same command again, I get:
Fatal server error:
Server is already active for display 99
If this server is no longer running, remove /tmp/.X99-lock
and start again.
So the server is supposed to be up and running already. However, when I tried to run this in followups:
DISPLAY=:99.0 firefox http://www.google.com
The console just hangs there, until I contol + C to kill it.
Is there anyone who knows what's going on here?
Thanks in advance.
It seems that it's okay. Your console didn't hang - it is firefox is working - you just don't see it:)
Edit: I think you can connect there with ssh -X and you'll see firefox window if it is working. (Only if you're running linux/mac on your dev machine)

Resources