Working Selenium Code on Windows is not working on Linux Machine through Jenkins

426 views
Skip to first unread message

PRINCE SETH

unread,
Nov 12, 2020, 5:11:33 AM11/12/20
to Selenium Users
Hi,

We have created selenium project Using Maven, TestNG, Java, Github & Jenkins which is working fine on OS Machine.

Problem: Now Jenkins is get installed on Linux machine and I have to run the script on Linux chrome Driver. My Script is able to read the test data from driversheet but seems unable to interact/identify elements of browser, even after Xvfb setup.

Pls see below log and find attached screenshots.


[INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running TestSuite 0 [main] INFO SuzhouTest - Got Property of logPath as ./log4j.properties 03:16:30,475 INFO SuzhouTest<strong>{1}</strong>:23 - Get Driver from Browser Setup 03:16:30,478 INFO SuzhouTest<strong>{1}</strong>:152 - Got Property of browser as chrome ***** This is identified as Linux OS ***** [1605168990.798][SEVERE]: bind() failed: Cannot assign requested address (99) 
Starting ChromeDriver 86.0.4240.22 (398b0743353ff36fb1b82468f63a3a93b4e2e89e-refs/branch-heads/4240@{#378}) on port 7852 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Nov 12, 2020 3:16:31 AM org.openqa.selenium.remote.ProtocolHandshake createSession INFO: Detected dialect: W3C 03:16:31,213 INFO SuzhouTest<strong>{1}</strong>:138 - We have choosen chrome Browser for our testing. 03:16:31,221 INFO SuzhouTest<strong>{1}</strong>:152 - Got Property of extentReportPath as ./extentReport/ 03:16:31,281 INFO SuzhouTest<strong>{1}</strong>:152 - Got Property of excelPath as ./testData/TestDataSheet.xlsx 03:16:31,844 INFO SuzhouTest<strong>{1}</strong>:33 - setInputData 03:16:31,861 INFO SuzhouTest<strong>{1}</strong>:50 - ***********Started Execution of Scenario 'SuzhouZREMProductTransfterApprove' *********** 03:16:31,865 INFO SuzhouTest<strong>{1}</strong>:152 - Got Property of urlASM as https://TestingAServerSite.com 03:16:31,866 INFO SuzhouTest<strong>{1}</strong>:158 - launchApplication 03:18:39,182 ERROR SuzhouTest<strong>{1}</strong>:176 - It seems, Unable to Launch Browser with URL :  https://TestingAServerSite.com 
org.openqa.selenium.WebDriverException: unknown error: net::ERR_CONNECTION_TIMED_OUT (Session info: headless chrome=86.0.4240.111) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'euw1z2dl080', ip: '10.192.69.88', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1062.1.1.el7.x86_64', java.version: '11.0.8' Driver info: org.openqa.selenium.chrome.ChromeDriver Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 86.0.4240.111, chrome: {chromedriverVersion: 86.0.4240.22 (398b0743353ff..., userDataDir: /tmp/.com.google.Chrome.RUFirr}, goog:chromeOptions: {debuggerAddress: localhost:42456}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: eager, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: ignore, webauthn:virtualAuthenticators: true} Session ID: ce0e334fe94209cdbc5adeb1d9344faf  
ChromeDriverCode Linux.png
Xvfb Setup in Jenkins.png
Jenkis-Log.png

PRINCE SETH

unread,
Nov 18, 2020, 9:50:12 AM11/18/20
to seleniu...@googlegroups.com, ddl...@gmail.com
Hi,

I am getting below error

[1605168990.798][SEVERE]: bind() failed: Cannot assign requested address (99) with message chromedriver started, even after using webdriverManager.

Please help me to solve this problem.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/98140ab6-065d-4be7-b248-8b2a89c0f07en%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages