Error using ChromeDriver when kicked off from teamcity - google-chrome

I was having trouble with firefox for my watir-webdriver tests and decided to move over to CHROME. This runs fine local dev box, however when kicked off from team city on our qa server I get the following error:
This is using the same chromedriver as on dev box.
Windows 2003 Server 32 bit
Chrome 14.0.835.186
chromedriver_win32_14.0.836.0.zip ChromeDriver server for win32
Ruby 1.8.7
watir-webdriver 0.3.4
selenium-webdriver 2.7.0
watir-page-helper 0.3.0
Error
[15:57:06]: Started ChromeDriver
[15:57:06]: port=1203
[15:57:31]: .\test\automation\proxy_launcher.cc(89): error: Value of: app_launched
[15:57:31]: Actual: 1
[15:57:31]: Expected: AUTOMATION_SUCCESS
[15:57:31]: Which is: 0
[15:57:31]: Error while awaiting automation ping from browser process
[15:57:56]: .\test\automation\proxy_launcher.cc(223): error: Value of: automation()->GetBrowserWindowCount(&window_count)
[15:57:56]: Actual: false
[15:57:56]: Expected: true

I believe your problem is you're running the TeamCity agent as a service, try manually running the agent using the instructions on: http://confluence.jetbrains.net/display/TCD5/Setting+up+and+Running+Additional+Build+Agents#SettingupandRunningAdditionalBuildAgents-StartingtheBuildAgent

I'm not using TeamCity or Watir, but I had the same error message from webdriver (using selenium server) running under a windows service.
The solution that worked for me was to run the service under another account and not the system account. Might be worth a try?

Related

WebdriverIO - Test fails with error Openfin

I have been trying to setup automation testing for our openfin application using the below repo as base
https://github.com/openfin/webinar-automated-integration-tests
I am using Openfin (Chrome version 61.0.3163.100) and Chromedriver 2.40.565498
When I run "npm test", the openfin application opens up. But the tests don't run. After waiting for sometime, it throws the below error in console.
ERROR: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 10.0.16299 x86_64)
chrome
I tried using other versions of chromedriver like 2.33, 2.34, 2.37, 2.38, 2.39, 2.41. Using these versions even the application doesn't appear. So, I guess the chromedriver version I am using is correct. I have also tried adding the below arguments to chromeOptions
--remote-debugging-port=9222,--no-sandbox,--headless,--disable-gpu
They didn't solve my issue. Not sure what is causing the issue. Any help would be much appreciated. Thanks in advance. Cheers!
This error message...
ERROR: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=Windows NT 10.0.16299 x86_64)
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
You are using chromedriver=2.40
Release Notes of chromedriver=2.40 clearly mentions the following :
Supports Chrome v66-68
Presumably you are using chrome=61.0
Release Notes of ChromeDriver v2.33 clearly mentions the following :
Supports Chrome 60-62
Your Selenium Client version is unknown to us.
So there is a clear mismatch between ChromeDriver v2.40 and the Chrome Browser v60.0
Solution
Ensure that:
Selenium is upgraded to current levels Version 3.141.59.
ChromeDriver is updated to current ChromeDriver v80.0 level.
Chrome is updated to current Chrome Version 80.0 level. (as per ChromeDriver v80.0 release notes)
Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
Take a System Reboot.
Execute your #Test as non-root user.
Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

Selenium Timedout Exception while running test cases from Jenkins

Am running a set of test cases from Jenkins. All the test cases are failing with org.openqa.selenium.TimedoutException on all the functions. I have tested the same code using eclipse in local and its executing fine. Please check on the below error and help on resolving this issue
Configurations:
Selenium- standalone - jar - 2.53
Chromedriver - 2.36
Chrome Browser - 65
testng jar = 6.8
Code Sample:
WebDriverWait wait = new WebDriverWait(driver, 1000);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(ORCollection.get("BtnMDUEligibilityClick").toString())));
WebElement el = driver.findElement(By.xpath(ORCollection.get("BtnMDUEligibilityClick").toString()));
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);", el);
WebElementClick(" ",ORCollection.get("BtnMDUEligibilityClick").toString());
Thread.sleep(10000);
Logs:
org.openqa.selenium.TimeoutException: Timed out after 40 seconds waiting for visibility of element located by By.xpath: //button[contains(#class,'js-submit')]
I have increased webdriver.wait value in code from 40 seconds to 1000 but still we are getting the same error as Timedout.
I assume that your XPath expressions are correct and you can manually open the browser on the Jenkins slave machine.
The issue could be connected with the lack of interactive desktop. This could happen if you have installed Jenkins on the slave machine as windows service. The recommended for Windows way to control a Windows slave is by using Launch slave agents via Java Web Start. More info here and here.

IDEA Javascript Chrome Remote Debugging

I try to get the JetBrains IDE Support 2.0.9 running with my IDEA 2017.1.4.
IDEA says that it waits for connection from the Support Extension on IDE port 63342.
The problem I found is that the Chrome Plugin gets an 404 error when it tries to create the WebSocket Connection
Ready to load system latest for IntelliJ IDEA 2017.1.4 (127.0.0.1:63342)
logging.kt:43 System latest loaded for IntelliJ IDEA 2017.1.4 (127.0.0.1:63342)
socket.kt:50 WebSocket connection to 'ws://127.0.0.1:63342/jsonRpc?v=2.0.9&f=Mozilla%2F5.0%20(Windows%20NT%206.1%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F59.0.3071.115%20Safari%2F537.36' failed: Error during WebSocket handshake: Unexpected response code: 404
value # socket.kt:50
value # socket.kt:69
value # platform.kt:32
value # chrome.kt:23
$f9 # console.kt:57
$fb # bootstrap.kt:157
$fc # bootstrap.kt:174
logging.kt:51 onerror [object Event]
value # logging.kt:51
$f4 # socket.kt:92
I try to find some solution via Google but the keyword "jsonRpc" polluted the results with no connections to IDEA that helped.
Further informations:
Network has no access to Internet
Chrome Version 59.0.3071.115 64-Bit
OS: Win 7 64bit
IDEA 2017.1.4
Plugin 2.0.9
Installed IDEA Plugins (External Ones)
Atlassian Connector for IntelliJ IDE (Version 3.0.16,SVN:1504201227)
CodeReview for IntelliJ IDEA (Version 0.5.4)
Grep Console (Version 5.9.141.000)
IDETalk (Version 145.258.11)
Lombok Plugin (Version 0.14.16)
SonarLint (Version 2.3.2)
String Manipulatio (Version 4.2.132.445)
Maven Helper (Version 3.1.138.1503)
I know that some could be very old but we don't have Internet Access at our Workstation to se updates or even update very good
PS: is there some kind of documentation what all the WebInterface URLs in IDEA are/how the Interface is constructed?

Selenium - Uncaught WebDriverError: chrome not reachable

Currently I'm using the follow stack:
1. Selenium Webdriver 3.0.1 (NodeJS API)
2. Mocha
3. Chromedriver 2.25.3
Often when I run my tests in Codeship (continuous integration) I get this error:
Uncaught WebDriverError: chrome not reachable
(Driver info: chromedriver=2.25.426924 (649f9b868f6783ec9de71c123212b908bf3b232e),platform=Linux 4.2.0-42-generic x86_64)
Note: This never happened running locally, only occurs when my tests start in codeship, and it's an intermittent error (sometimes it happens, sometimes not)
Screenshot error:
Any ideia how solve this?
Does codeship have chrome installed on their test server?
I'm guessing not. It might be better to run this against phantomjs (headless browser) instead for CI purposes.

cannot run Selenium tests on some browsers

i have tests made with Mink using Selenium 2 driver. everything is working OK under Windows 7 with Firefox, Chrome and IE and Ubuntu 12.10 with Firefox. the problems are:
when i try to run test on Opera (Windows 7) it launches but it cannot find any element on the page - the test fails.
when i try to run test on Chrome (Ubuntu 12.10) using chromedriver - the system returns an error "An unknows server side error occured while processing the command".
when i try to run test on Opera (Ubuntu 12.10) - the system returns an error "No response in timely fashion".
what am i doing wrong? how can i make work Opera in Windows and Opera and Chrome in Ubuntu?
p.s. i use system as Selenium Grid 2
For me on Windows it work:
java -jar "c:\selenium-server-standalone-2.35.0.jar" -forcedBrowserMode "*googlechrome c:\Program Files\Google\Chrome\Application\chrome.exe"
May be for u:
java -jar "c:\selenium-server-standalone-2.35.0.jar" -forcedBrowserMode "*opera c:\Program Files\pathToOpera.exe"
It might be a matter of Operative System as well.
I am developing on a Windows machine and my colleagues are working on Mac.
They had just included the chrome driver for mac, so tests didntĀ“t work on my computer.
I had to do this:
if (OS.indexOf("win") >= 0) {
System.setProperty("webdriver.chrome.driver", "src/test/resources/selenium_drivers/chromedriver.exe");
} else if ((OS.indexOf("mac") >= 0)) {
System.setProperty("webdriver.chrome.driver", "src/test/resources/selenium_drivers/chromedriver");
}
Two different driversa that you can find at http://chromedriver.storage.googleapis.com/index.html