Closed shyampatadia closed 11 months ago
Appium web driver 4.4.0 is not compatible with selenium 4. You will need to update to appium dotnet client version 5.x beta release
Tried it with that but I am getting the below error:
The Code to reproduce the same is as follows:
var appiumOptions1 = new AppiumOptions();
appiumOptions1.AcceptInsecureCertificates = true;
appiumOptions1.App = @"C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE";
Process.Start(
@"WinAppDriver.exe");
var sessionExcel = new WindowsDriver(
new Uri("http://127.0.0.1:4723"),
appiumOptions1
);
I am getting the exception on the line where I initialize sessionExcel
OpenQA.Selenium.WebDriverArgumentException: Bad capabilities. Specify either app or appTopLevelWindow to create a session
at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse, String commandToExecute)
at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Appium.AppiumDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.WebDriver.StartSession(ICapabilities desiredCapabilities)
at OpenQA.Selenium.WebDriver..ctor(ICommandExecutor executor, ICapabilities capabilities)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(ICommandExecutor commandExecutor, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions, TimeSpan commandTimeout)
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities appiumOptions)
at OpenQA.Selenium.Appium.Windows.WindowsDriver..ctor(Uri remoteAddress, AppiumOptions AppiumOptions)
And the above code works fine when I use it with following package versions:
<PackageReference Include="Appium.WebDriver" Version="4.1.1" />
<PackageReference Include="Selenium.Support" Version="3.141.0" />
<PackageReference Include="Selenium.WebDriver" Version="3.141.0" />
Please see the discussion here : https://github.com/appium/dotnet-client/issues/487
Hello @Dor-bl, I checked out this #487 issue, but is there any example on how can I use this package for my development? Is there any example repository for using this with C# binding?
All should basically be the same. You can see an example here : https://github.com/appium/dotnet-client/blob/release/5.0.0/test/integration/Windows/ClickElementTest.cs The main idea is to use the appium window driver as a proxy, so you should start appium server regularly, just make sure you follow the guide on the corresponding repo.
@shyampatadia did you get a chance to check if the solution above works for you? Can I close this issue?
I tried but couldn't find a proper way how I can use that, I saw the link that you provided, but I was confused, is that a nugget package which I can install?
I've sent the example code on how to use the appium windows driver. Just make sure you run via appium server and not Microsoft Windows driver
@shyampatadia, any updates on this issue?
Yes the issue is resolved really sorry for not replying earlier.
Description
Hello Trying to initialize the appium options as :
Below is the Exception that I am getting: System.TypeLoadException: Access is denied: 'OpenQA.Selenium.Remote.DesiredCapabilities'. at OpenQA.Selenium.Appium.AppiumOptions..ctor()'
Environment
Below are the Package References:
Below is the netcore version that I am using:
Desktop OS version is: Windows 11. And I am trying to run it for launching WinAppDriver (1.2.1)
Code To Reproduce Issue
AppiumOptions appiumOptions = new AppiumOptions();
Exception stack traces