selenium TimeoutException on Linux/ chromium - selenium

I am getting a timeout error on the linux using chromium browser but same is working on the windows.
I am using the serenity BDD.
Caused by: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for TransactionPage.moreTransactionButton to be not displayed (tried for 5 second(s) with 100 milliseconds interval)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'mesos-jenkins-9fd7a38e844041bcbcbf7079e094c3bc-java180u161-mave', ip: '172.17.0.3', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.11.6.el7.x86_64', java.version: '1.8.0_161'
Driver info: driver.version: unknown
at org.openqa.selenium.support.ui.FluentWait.timeoutException(FluentWait.java:304)
This is button I am waiting for to get invisible.
#FindBy(xpath = "//button[contains(.,'Show More Transactions')]", timeoutInSeconds = "180")
public WebElementFacade moreTransactionButton;
Edit 1:
This is the waiting function
element(moreTransactionButton).waitUntilNotVisible().withTimeoutOf(Duration.ofSeconds(300));

Related

org.openqa.selenium.WebDriverException: unknown error: session deleted because of page crash

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?

Why does Selenium / Jenkins report two different ChromeDriver versions?

When I run Selenium jobs through Jenkins, I see 2 different ChromeDriver versions reported:
Expected
17:00:29.375 [TestNG-test=wsc tests-3] WARN c.r.a.p.c.c.CreditApplicationPage - Unable to locate field: {}
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//form[#name='creditAppDynaValidatorActionForm']//span[#class='message']"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 3.10.0-693.11.1.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'jenkins-slave-4368551bbabf', ip: '172.17.45.11', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.11.1.el7.x86_64', java.version: '1.8.0_152'
The Driver info: chromedriver=2.45.615279 makes sense to me. This is the driver version we've installed.
Alternate
org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//form[#name='creditAppDynaValidatorActionForm']//span[#class='message']"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=70.0.3538.67 (9ab0cfab84ded083718d3a4ff830726efd38869f),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'jenkins-slave-4368551bbabf', ip: '172.17.45.11', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-693.11.1.el7.x86_64', java.version: '1.8.0_152'
What does the Driver info: chromedriver=70.0.3538.67 mean; why is it displayed here? Version 70.0 is so very far off from 2.45.
A colleague pointed me to the answer:
The driver version reported is the WebDriver version as run through the Selenium Grid.

Unable to launch Firefox browser in Windows Xp (32 bit) Using Selenium Webdriver

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.

Unable to launch safari in simulator using appium xcuitest

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.

selenium web driver error when trying to run a script on eclipse

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?