I updated Selenium in Visual Studio to the latest version (Selenium 4) and noticed WinAppDriver is not compatible with the latest Selenium throwing errors.
Aimed to replace DesiredCapabilities by Options but still getting error on WindowsElement .
I was wondering if anyone can help me to fix the code and get it working.
The code I have in Visual Studio:
Process.Start(#WinDriver);
AppiumOptions appiumOptions = new AppiumOptions();
appiumOptions.AddAdditionalCapability("app", "Root");
appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC");
var session = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"),
appiumOptions);
and this is the error message VS is displaying:
Appium.Weddriver is on version 4.3.2
and
Windows.WebDriver is on 4.5
Thanks,
Related
We are executing our selenium automation script using jenkins window service(Headless mode) on daily basis .it was working fine till yesterday. suddenly it stopped working and not launching the browser. it shows the below error message [1553677874.187][SEVERE]: Timed out receiving message from renderer: 600.000. after that all the remaining test cases are getting failed.
It is working fine if we run the build using jenkins as without windows service. We are experiencing this issue only with windows as service
My chrome driver version :73.0.3683.68
Chrome browser version :73.0.3683.68
Selenium Version :3.14.0
I have tried to downgrade the browser version and driver version. even though it is not working
I am expecting the browser should launch in the background when we execute using jenkins as windows service but getting error message.
System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addArguments("load-extension=C:\\1.13.4_0");
options.addArguments("--start-maximized");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-popup-blocking");
// options.addArguments("window-size=1400,600");
options.addArguments("enable-automation");
options.addArguments("--headless");
options.addArguments("--window-size=1920,1080");
options.addArguments("--no-sandbox");
// options.addArguments("--disable-extensions");
options.addArguments("--dns-prefetch-disable");
options.addArguments("--disable-gpu");
options.setPageLoadStrategy(PageLoadStrategy.NORMAL);
DesiredCapabilities capabilities =
DesiredCapabilities.chrome();
capabilities.setCapability(ChromeOptions.CAPABILITY,
**strong text**options);
return new ChromeDriver(capabilities);
Seems you are using the following configuration:
chromedriver=73.0.3683.68
chrome=73.0.3683.68
Windows OS
John Chen (Owner - chromedriver) recently have confirmed that,
We have confirmed issues with take screenshot when Chrome 73.0.3686.75 is started by a service (such as Jenkins or Task scheduler) on Windows. Please see https://crbug.com/942023 for more details. We apologize for any inconvenience caused by this. However, we haven't yet been able to observe similar issue on Linux, so we appreciate any help you can provide to enable us to reproduce the issue on Linux. We don't have access to TeamCity, but we have tested take screenshot using Docker image produced by Selenium (selenium/standalone-chrome:3.141.59-lithium), and didn't find any problems.
Yesterday (Mar 26, 2019), John once again confirmed:
I am aware of some issues with running Chrome 73 from Jenkins. I don't know any workarounds. Please following https://crbug.com/942023 for updates.
Update
We were able to dig up the main issue. The main issue is not with ChromeDriver v73.x as such but with Chrome v73.x and John officially confirms it as:
The root cause is indeed in Chrome 73.x, not in ChromeDriver. We are working with Chrome devs to find a solution.
Solution
A quick fix solution will be to:
Downgrade Chrome Browser to Chrome v72.x
Use a matching ChromeDriver among:
ChromeDriver 2.46
ChromeDriver 72.0.3626.69
Note: If you are using Chrome version 72, please download ChromeDriver 2.46 or ChromeDriver 72.0.3626.69
Ensure that JDK is upgraded to recent level of JDK 8u202.
Outro
You can find the relevant discussions in:
Page.captureScreenshot no longer works in Chrome 73 under Selenium as a Service on Windows
Error [SEVERE]: Timed out receiving message from renderer: 20.000 while executing the testsuite through Selenium on Jenkins
Download Google Chrome 72 Offline Installer For All Operating Systems
Update(03-April-2019)
Adding the argument --disable-features=VizDisplayCompositor through an instance of ChromeOptions() seems solves the issue:
ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-features=VizDisplayCompositor");
WebDriver driver = new ChromeDriver(options);
driver.get("https://google.com");
Possible problem is that your Google Chrome updated and became incompatible with your Chromedriver. I suggest either getting a new Chromedriver or downgrading your Google Chrome to a previous version and disabling auto updates.
You can verify the required Chromedriver version for your Google Chrome here:
http://chromedriver.chromium.org/downloads
Step 4 of the following link worked for me to disable automatic google Chrome updates.
https://www.webnots.com/7-ways-to-disable-automatic-chrome-update-in-windows-and-mac/
Add below property(1) before ChromeDriver initialization
System.setProperty("webdriver.chrome.silentOutput", "true");
driver = new ChromeDriver();
Iam trying to test simple rediffmail login page by sending username and password using Chrome and Explorer in Eclipse. Till yesterday, it was working fine but suddenly same code not working in Explorer(working fine in Chrome). Getting the "Configuration Failures: 1" error.
-Windows Operating system : 7
-Internet Explorer version : 8.0
-IEDriverServer_Win32_3.0.0
My code is follows :
System.setProperty("webdriver.ie.driver","C:\\IEDriverServer_Win32_3.0.0\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.get("https://mail.rediff.com/cgi-bin/login.cgi");
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.findElement(By.xpath("//*[#id='login1']")).sendKeys("sample.3400");
driver.findElement(By.xpath("//*[#id='password']")).sendKeys("edutorignitor12345");
I tried to google the issue but no solution.
NOTE: Element Locators are correct as same code is running with Chrome.
I had faced a similar issue. Turned out that the driver needed to be updated. Try that.
I am unable to run the code
capabilities.setCapability("app", "C:\\Windows\\System32\\calc.exe");
CalculatorSession = new IOSDriver(new URL("http://127.0.0.1:4723"), capabilities);
this code opens the calculator app but it say IOSDriver is wrong
Original code
I changed just two lines of the code
Software: Java, Eclipse, WinappDriver
I am automating Windows application in Windows 10
I solved the above problem updating the driver manual rather than taking the auto-suggestion version in maven
I am running a test suite with more than 500 test cases with selenium 2.53 on IE11 browser.
I am getting error "Command line server for the IE driver has stopped working" during the execution randomly and the execution gets stuck.
I've updated IEDriver from 2.48.0 to v3.1.0.0 & v3.2.0.0 but no luck.
I've also tried to add new key "TabProcGrowth" (value = "0") under "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main" but it didn't help.
OS: Windows 7- 64 bit
Selenium Version: 2.53.0.0
Browser: IE
Browser Version: IE 11.0.9600.18537
Any help would be highly appreciated.
i had faced the same issue but with higher version IE Driver 3.6.0
solution:try with different version
IE Driver 3.3.0 has resolved the issue and even use the same version of Selenium.Support -Version 3.3.0
Selenium.WebDriver-Version 3.3.0
Selenium.WebDriver.IEDriver 3.3.0
please refer this link for detailed description of each version https://raw.githubusercontent.com/SeleniumHQ/selenium/master/cpp/iedriverserver/CHANGELOG
In my current automation project I am attempting to automate my testing based on various browsers using Gradle and Geb. I've been able to get all browsers working with the exception of Microsoft Edge. Currently I am seeing:
geb.driver.DriverCreationException: failed to create driver from
callback
I've verified that I am downloading the MicrosoftWebDriver.exe to the expected directory in my project but I am not sure if I am missing something in my driver setup:
driver = {
EdgeOptions options = new EdgeOptions()
options.pageLoadStrategy("eager")
edgeDriver = new EdgeDriver()
return edgeDriver
}
I am fairly new to Geb and Gradle as a whole so it is entirely possible I am missing something. Any help would be appreciated.
As far as I am aware You need more than just the exe to use the MS Webdriver. The machine that's executing the Webdriver code will need to have one of the following MSI's installed:
For Windows 10 Build 10240, install this version of Microsoft WebDriver.
For Windows 10 Fall 2015 Update, install Microsoft WebDriver Fall 2015 Update.
For the latest preview build from the Windows Insider Program, install this version of Microsoft WebDriver.
I think the MSI changes some switches in Edge to enable it to be controlled by Web driver.
Turns out that my issue was due to having just upgraded my local machine to Windows 10 and the Microsoft Web Driver preview build requires the Fall 2015 update which is unavailable to me for 31 days.