Getting error "org.openqa.selenium.WebDriverException: java.net.ConnectException: Connection refused:" - selenium

I am using selenium webdriver for the testing application. i am using using Marionettedriver for the browser. however when I run the code it gives the error "org.openqa.selenium.WebDriverException: java.net.ConnectException: Connection refused:" I have check the system path also no issue in the same.
so please suggest how to solve the error.
Also getting error " error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context
USAGE:
geckodriver.exe [FLAGS] [OPTIONS]".
I am not able to understand for what issue this error is appears. So please let me know how to solve this
I have used the jar file for selenium server and selenium standalone server in the project. still same error shows. Also as mentioned above it shows the error of " error: Found argument '--webdriver-port' which wasn't expected, or isn't valid in this context
USAGE:
geckodriver.exe [FLAGS] [OPTIONS]".

When you run your webdriver tests, you need to "obtain" browser from selenium server/grid. Connection refused message means there is no listening server on a host/port you provided.

Related

Enter Key throws error when running WDIO on Browserstack

I'm trying to run some WDIO tests on Browserstack (#wdio/browserstack-service#7.24.0). Using chrome browser and Samsung Galaxy S20 capabilities. There is a point where I need to send Enter key, I'm using .keys('\uE007') and the action is performed on the device as expected, but there is an error coming from BS. ERROR webdriver: Request failed with status 404 due to Error: The URL '/wd/hub/session/0296501ef9a8127fa1f5663921d3b1e52463eaf1/actions' did not map to a valid resource
I tried to use try/catch to prevent that error marking my execution as failed, but try/catch does not stop it. My guess, it is because of async logic during they send key.
so, I need help to prevent that error or find a way to catch it properly.
any suggestion?

Getting "Failed to start Selenium listener." error message while running testcafe script through saucelabs

I am trying to run testcafe script through saucelabs. But getting the following error message.
MAIN failed to create listener on port 4445
MAIN possible socket error: libevent connection error
Failed to start Selenium listener. Please make sure there are no other applications using the Selenium port, or specify an alternative port for Sauce Connect via the --se-port option (exit code 2).
It looks like another application already used the 4445 port (see a similar discussion here).
 
Also, you can use the official Saucelabs Troubleshooting Guide to fix this problem.

Selenium Standalone Servers giving error "DefaultRemoteProxy unknown version,Connect to 10.0.2.15:5566 [/10.0.2.15] failed: connect timed out"

Selenium Grid Testing:
I have installed virtual box in my system and I am trying to use my local system as hub and the windows machine in the virtual box as node.
Whatever the selenium standalone server I use ( I tried a lot of versions) but it is always giving me the error "DefaultRemoteProxy unknown version,Connect to 10.0.2.15:5566 [/10.0.2.15] failed: connect timed out" on the grid console.
In the Command Prompt initially it is saying that the node is registered successfully but after some time it is saying " Marking the node http://10.0.2.15:5566 as down: cannot reach the node for 2 tries".
I have attached the screenshot. Because of this the tests are failing.
I have disable the windows firewall as well on both local and virtual box windows systems. But still no luck.
Is there anything wrong I am doing?
Can someone please help me with this?
Selenium Grid Console:
After trying a lot, I got the answer finally. This is related to network setup between my local host and the VM.
In VMBox, under the settings for a particular system, under network I have added one more adapter which is "Host-only adapter" in addition to the NAT and it resolved my problem.

spring-xd-1.3.1.RELEASE-yarn, submit error

If anyone has seen this issue before, please help me.
Here is my steps.
And, do I need to start from opt/spring-xd-1.3.1/xd/bin/xd-admin and xd-container before running below commands from opt/spring-xd-1.3.1.RELEASE-yarn/bin/
Thank you in advance.
bin/xd-yarn push
bin/xd-yarn submit => having below error.
Error executing a spring application; nested exception is org.springframework.yarn.YarnSystemException: Failed on local exception: java.io.IOException: com.google.protobuf.InvalidProtocolBufferException: Protocol message end-group tag did not match expected tag.; Host Details : local host is:

403 : Access forbidden selenium

I want to run my testcases with the help of parameters mentioned in the testSuite.xml file and use them in my test cases by mentioning
#Parameters({ "selenium.host", "selenium.port", "selenium.browser", "selenium.url" }) in my code.
Though, I started a standalone server with -trustAllSSLcertificates, the system is giving "403 access forbidden error". However, if I run the test cases individually, by hardcoding the port, URL, Host & browsername, it works fine.
Where am i going wrong?.....
BTW, I run my test cases using build.xml file. Here also i added the -trustAllSSLcertificates when starting the server. But still it does not work.
Please help.
When running Selenium WebDriver using selenium-server-standalone I kept getting this error.
HTTP ERROR: 403
Forbidden for Proxy
RequestURI=/session
Turns out that it was because I needed to use the url http://localhost:4444/wd/hub as the url for the RemoteWebDriver client to connect to.
I'm sure there are a number of things that could cause the HTTP ERROR: 403, but you may want to double-check that it's resolving to the correct base url.