Unable to connect to qt application running on ubuntu using remotewebdriver

32 views
Skip to first unread message

AtmBeginner

unread,
Sep 14, 2017, 11:41:58 PM9/14/17
to Selenium Users
I have a qt application running on ubuntu (ubuntu is on my windows PC) and i am looking to automate my tests using selenium webdriver. Below is my code and the errors i am getting. Unable to figure out how to talk to my app. I am able to open other browsers on my ubuntu though.

public class test {
static WebDriver driver;
static String nodeUrl;
public static void main(String[] args) throws MalformedURLException{
DesiredCapabilities cp = new DesiredCapabilities();
capabilities.setCapability("browserStartWindow", "*");
WebDriver driver = new RemoteWebDriver(new URL("my ubuntu's ip:9517"), cp);

error:

Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:54:15.039Z' System info: host: 'CRS9L32', ip: 'ipaddress', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_144' Driver info: driver.version: RemoteWebDriver at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:667) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:255) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:237) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:138) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:175) at Grid.Firefoxtest.main(Firefoxtest.java:25) Caused by: org.apache.http.conn.HttpHostConnectException: Connect to ubuntuipaddress:9517 [/ubuntuipaddress] failed: Connection refused: connect at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:139) at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:87) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:337) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:136) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:646) ... 5 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142) ... 20 more
Reply all
Reply to author
Forward
0 new messages