question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Start ClickOnce Application with AppiumOptions

See original GitHub issue

Hello. I have some problems with starting click-once application by AppiumOptions class. My code is too simple:

AppiumOptions appiumOptions = new AppiumOptions();
appiumOptions.AddAdditionalCapability("ms:waitForAppLaunch", "30");
appiumOptions.AddAdditionalCapability("ms:experimental-webdriver", false);
appiumOptions.AddAdditionalCapability("deviceName", "WindowsPC");
appiumOptions.AddAdditionalCapability("platformName", "Windows");
appiumOptions.AddAdditionalCapability("app", "C:\Path\To\My\ApplicationName.appref-ms");

var winDriver = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);

and I catch Exception “OpenQA.Selenium.WebDriverException: ‘Failed to locate opened application window with appId: C:\Path\To\My\ApplicationName.appref-ms, and processId: 7356’” on the last line, but my click once app;ication starts without any problems.

I am using ms:waitForAppLaunch with 30 seconds of timeout (it’s enought) but it can’t help me. Exception

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:16

github_iconTop GitHub Comments

1reaction
vberesnevcommented, Jun 5, 2020

@mialeska It seems I find the resolve of this problem! But it’s too ugly, lol 😃 Using Inspect.exe I noticed that refresh of UI elements starts after mouse over one of element second page. But I haven’t access to this element by name or id before refreshing. So my actions: I open second page, move mouse coursor to the element by pixcel coordinate (my app is fulscreen), after that WAD refreshs tree and I have access to the UI elements of the second page. Thank you so much, you gave me way to resolving my issue! 😃 Have a nice day!

0reactions
vberesnevcommented, Jun 9, 2020

@splekhan My solution depends on app window, so if app will not be open full screen or place of elelment will be changed - my solution will go to trash 😃

I tried reopen win app driver and reattach my application to it, but it didn’t work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to launch click-once application in Win App driver?
I am using Win App Driver to automate WPF application, Our WPF application is click once application. When I launch the application I ......
Read more >
Automating WPF application using WinAppDriver
I am automating WPF application using Win App Driver, When I am trying to launch the WPF application I am getting error "Failed...
Read more >
Programmatically launching ClickOnce applications
An in-depth look at the various ways that ClickOnce applications can be programmatically launched.
Read more >
Run Appium tests using C# SDK
Run Appium tests written in C# on real Android and iOS devices with BrowserStack App Automate.
Read more >
Running a ClickOnce Application from Another Program
My solution is to use the application described herein, ExecuteClickOnceApp , which will execute a ClickOnce application given the company name ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found