I'm automating wb application in iOS simulator v10.0 using appium xcuitest v1.6 but I'm unable to launch the safari with the url mentioned in the code. Getting following exception.Please help.
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: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'TVMATP310436M', ip: '192.168.1.116', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_111'
Driver info: driver.version: IOSDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:593)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:51)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:240)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:126)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:139)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:47)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:114)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:132)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:81)
at com.jcp.setup.SetUpAppium.main(SetUpAppium.java:29)
Caused by: org.openqa.selenium.WebDriverException: org.apache.http.NoHttpResponseException: 0.0.0.0:4723 failed to respond
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'TVMATP310436M', ip: '192.168.1.116', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_111'
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:84)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
... 11 more
Caused by: org.apache.http.NoHttpResponseException: 0.0.0.0:4723 failed to respond
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:143)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:153)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:144)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:72)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:133)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:69)
... 12 more
I'd rather uninstall and install appium 1.6.4 by using these commands:
npm uninstall appium
npm install -g appium#1.6.4
There were issues related to Safari with earlier appium versions.
Related
I am getting thw following error while running the code headless on a server.
I have also incorporated the following two ways:
chromeOptions.addArguments("--disable-dev-shm-usage");
chromeOptions.addArguments("--no-sandbox");
Still no success.
Error:
org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash
from unknown error: cannot determine loading status
from tab crashed
(Session info: headless chrome=83.0.4103.116)
Build info: version: '3.14.0', revision: 'aacccce0', time: '2018-08-02T20:19:58.91Z'
System info: host: 's2c-beta-app', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1121-aws', java.version: '1.8.0_275'
Driver info: org.openqa.selenium.chrome.ChromeDriver
How can I resolve this error?
I am using following configuration:
Windows 7
Java: 1.8.0_91
Selenium: 3.10.0
Chrome browser: 62.0
Chrome Driver : 2.34
While running found below error:
org.openqa.selenium.SessionNotCreatedException: session not created exception
from disconnected: unable to connect to renderer
(Session info: chrome=62.0.3202.62)
(Driver info: chromedriver=2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1),platform=Windows NT 6.1.7601 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 938 milliseconds
Build info: version: '3.10.0', revision: '176b4a9', time: '2018-03-02T19:03:16.397Z'
System info: host: 'OFFICE-PC', ip: '192.168.1.230', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: driver.version: ChromeDriver
Hmmmmm... Looks familiar.
Have you checked that you are not using a 32bit ChromeDriver for a 64bit Chrome browser?
Protractor version: 5.1.2
Safari version: 10.1.2
I have enabled 'Allow Remote Automation' from Safari -> Develop and started the safari driver from cmd using the following command:
/usr/bin/safaridriver -p 8844
Now, trying to run the protractor tests using protractor conf.js. The tests fail to start with the following logs:
Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'
System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: driver.version: unknown
[15:28:40] E/launcher - SessionNotCreatedError: Could not create a session: You must enable the 'Allow Remote Automation' option in Safari's Develop menu to control Safari via WebDriver. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 32 milliseconds
Build info: version: '3.5.1', revision: '9c21bb67ef', time: '2017-08-16T21:10:06.092Z'
System info: host: 'dyn-49-127-9-116.its.monash.edu.au', ip: 'fe80:0:0:0:479:1a15:751b:51d6%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144'
Driver info: driver.version: unknown
at WebDriverError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:27:5)
at SessionNotCreatedError (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:214:5)
at Object.checkLegacyResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/error.js:505:15)
at parseHttpResponse (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:509:13)
at doSend.then.response (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/http.js:440:13)
at process._tickCallback (internal/process/next_tick.js:109:7)
From: Task: WebDriver.createSession()
at Function.createSession (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver.js:777:24)
at createDriver (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:167:33)
at Builder.build (/usr/local/lib/node_modules/protractor/node_modules/selenium-webdriver/index.js:632:14)
at Hosted.getNewDriver (/usr/local/lib/node_modules/protractor/lib/driverProviders/driverProvider.ts:60:29)
at Runner.createBrowser (/usr/local/lib/node_modules/protractor/lib/runner.ts:225:39)
at q.then.then (/usr/local/lib/node_modules/protractor/lib/runner.ts:391:27)
at _fulfilled (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:834:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:863:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/protractor/node_modules/q/q.js:796:13)
at /usr/local/lib/node_modules/protractor/node_modules/q/q.js:556:49
[15:28:40] E/launcher - Process exited with error code 19
I figured out the issue. Since built in safari driver has a limitation of only one browser window at a time, I quit all the running safari windows and ran the tests again. Worked perfectly fine :)
Reference:
https://webkit.org/blog/6900/webdriver-support-in-safari-10/
Kinda tricky, because currently it's not quite working due webdriver/selenium incompatibilities. We are hoping that, with the new webdriver release, it will work. See here.
I am unable to launch the firefox browser (49 version) and with Selenium Jar is 2.5.3 .
Getting Below error:-
*2016-11-10 18:45:36 ERROR BrowserConfig:293 - Error in EbselenCore.setBrowser:Specified firefox binary location does not exist or is not a real file: C:\Program Files (x86)\Mozilla Firefox\firefox.exe
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'karthik', ip: '0.0.0.0xx', os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.8.0_111'
Driver info: driver.version: unknown*
Even i tried with the system.setproperty to the
System.setProperty("webdriver.firefox.bin", "xxxxx\\xxx\\firefox.exe");
System.setProperty("webdriver.chrome.driver", "xxxxx\\xxx\\chromedriver.exe");
System.setProperty("webdriver.chrome.bin", "xxxxx\\xxx\\chrome.exe");
Even i tried with the chrome driver :-
Nov 11, 2016 2:29:10 PM org.openqa.selenium.os.UnixProcess checkForErrorSEVERE: org.apache.commons.exec.ExecuteException:Process exited with an error: -1073741511 (Exit value: -1073741511) 2016-11-11 14:29:11 ERROR BrowserConfig:293 - Error in EbselenCore.setBrowser:Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46' System info: host: 'karthik', ip: 'x.x.x.x.', os.name: 'Windows XP', os.arch: 'x86', os.version: '5.1', java.version: '1.8.0_111' Driver info: driver.version: SeleniumChromeDriver
Thanks in advance for your response.
Selenium 2.5.3 only work with firefox 46 and older. You need to use selenium 3 and newer from firefox 47 onwards. You also need to use geckodriver.
I am getting this error when I try to run a script in eclipse using Selenium webdriver:
org.openqa.selenium.remote.UnreachableBrowserException: Error
communicating with the remote browser. It may have died. Build info:
version: '2.33.0', revision: '4e90c97', time: '2013-05-22 15:32:56'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version:
'6.1', java.version: '1.7.0_45' Connection to 127.0.0.1:7055 refused
What could be the problem?