Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 11 Gui test Wndorms. #292

Open
daCostaeurogard opened this issue Feb 6, 2025 · 4 comments
Open

Windows 11 Gui test Wndorms. #292

daCostaeurogard opened this issue Feb 6, 2025 · 4 comments

Comments

@daCostaeurogard
Copy link

daCostaeurogard commented Feb 6, 2025

After installing the latest windriver and starting it.

I' have tried to write my first test
`
private new WindowsDriver? _driver;
const string editorsDemoPath =
@"C:\Work\2022.1\Demos.Win\EditorsDemos\CS\EditorsMainDemo\bin\Debug\EditorsMainDemo.exe";

[ClassInitialize]
public static  void TestFixtureSetup(TestContext context)
{
    {
        // Set up desired capabilities
        var appCapabilities = new AppiumOptions();
        appCapabilities.AddAdditionalAppiumOption("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
        appCapabilities.AddAdditionalAppiumOption("deviceName", "WindowsPC");

        // Initialize the Windows driver
        var driver = new WindowsDriver<WindowsElement>(new Uri(
            }

}
[ClassCleanup]
public static void TestFixtureTearDown()
{
    _driver.Dispose();
} 

`

but this produces an error

as WindowsDriver is unkown.

error (aktive) CS0308 Type "WindowsDriver" is not generic and can not be used as Typargument

Is there a solution for this possible
?

@mykola-mokhnach
Copy link

Please provide the full server log

@daCostaeurogard
Copy link
Author

daCostaeurogard commented Feb 11, 2025

Hi,
which server log?

Image

Windows Application Driver>WinAppDriver.exe is runnign as far as i can tell

then code is from Visual Studio 2022

Image

I can not start a connection as the Object needed for that can not be declared.

So please explain in deatil which information ou need.

@KazuCocoa
Copy link
Member

I guess you're asking about client implementation (before sending a request to appium server)

https://github.com/appium/dotnet-client/blob/66a1c5f9400a3d0981990d4d0379d68c051dcc7e/test/integration/Windows/ClickElementTest.cs might help, or asking such a generation question in https://discuss.appium.io/ also should help.
I wondered if private new WindowsDriver? _driver; at least could be private WindowsDriver _driver..?

@daCostaeurogard
Copy link
Author

thank i will look in the provided sample link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants