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

#13173 WinAppDriver does not wait long startup an UWP app #59

Merged
merged 3 commits into from
Sep 24, 2019

Conversation

Korop
Copy link

@Korop Korop commented Sep 5, 2019

add create session timeout and waitForCondition to retry the session creation in case of an error
add 'createSessionTimeout' capability, WindowsDriver only

@jsf-clabot
Copy link

jsf-clabot commented Sep 5, 2019

CLA assistant check
All committers have signed the CLA.

@@ -54,7 +54,7 @@
"watch": "gulp watch",
"coverage": "gulp coveralls",
"precommit-msg": "echo 'Pre-commit checks...' && exit 0",
"precommit-test": "REPORTER=dot gulp once",
"precommit-test": "env REPORTER=dot bash -c 'gulp once'",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this change is necessary?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on my PC (Windows10) I have permanent error when do commit. precommit hook:
appium-windows-driver> git.exe commit --file=C:/Users/autotest/AppData/Local/Temp/smartgit-675290320427002764tmp/commit-12634442983062762856.tmp -o -- package.json
'Pre-commit checks...'
'REPORTER' is not recognized as an internal or external command,
operable program or batch file.
pre-commit:
pre-commit: We've failed to pass the specified git pre-commit hooks as the precommit-test
pre-commit: hook returned an exit code (1). If you're feeling adventurous you can
pre-commit: skip the git pre-commit hooks by adding the following flags to your commit:
pre-commit:
pre-commit: git commit -n (or --no-verify)
pre-commit:
pre-commit: This is ill-advised since the commit is broken.
pre-commit:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@imurchie FYI

@licanhua
Copy link

WinAppDriver is introducing 'ms:waitForAppLaunch' flag in the next preview release and it may help with this problem

@Korop
Copy link
Author

Korop commented Sep 20, 2019

WinAppDriver is introducing 'ms:waitForAppLaunch' flag in the next preview release and it may help with this problem

@licanhua
That will be nice and right place for the feature! But till this happens I prefer to have the workaround.

add create session timeout and waitForCondition to retry the session creation in case of an err
add 'createSessionTimeout' capability for WindowsDriver only
fix desiredCapConstraints for WinAppDriver
return true;
} catch (error) {
lastError = error;
log.warn(`Could not start WinAppDriver session error = '${error}', attempt = '${retryIteration}' from '${this.createSessionRetry}'`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use error.message. error itself is an object

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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

Successfully merging this pull request may close these issues.

5 participants