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

Get the pid from winappdriver #1341

Closed
Milly89 opened this issue Oct 19, 2020 · 6 comments
Closed

Get the pid from winappdriver #1341

Milly89 opened this issue Oct 19, 2020 · 6 comments

Comments

@Milly89
Copy link

Milly89 commented Oct 19, 2020

After created a session with winappdriver, how to get the pid from session which the pid is associated with application process id in task manager ?

image

@anunay1
Copy link

anunay1 commented Oct 19, 2020

Your application have a splash screen? You need to create a session with desktop session and attach the application to that sessionDesktop Session

@Wolfe1
Copy link

Wolfe1 commented Oct 19, 2020

@meilinfan Like anunay1 said it look like your app launches another window that ends up being your final window. So winappdriver is still looking for that original window. You can take a look here at how we handle the issue in python for inspiration: https://github.com/Accruent/robotframework-zoomba/blob/master/src/Zoomba/DesktopLibrary.py#L163

@Milly89
Copy link
Author

Milly89 commented Oct 20, 2020

Thanks @Wolfe1 @anunay1 for your reply:
I just Create a session like below:
image

Then my application will be show up . But when I want to close the app using Driver.quit, the app is still opened . So I want to know how to get the pid from app which created by session , and better the pid is the same with task Manager?

@alexserov
Copy link

@meilinfan I think, in your case, you can try using the /forcequit parameter like mentioned in the #159 (comment)

@anunay1
Copy link

anunay1 commented Oct 26, 2020

@meilinfan There are two ways to handle it, on is to check whether application is running and if its true, then kill the application, the other would be to to kill the application in the tear down method.

@Milly89
Copy link
Author

Milly89 commented Mar 25, 2021

Thanks all a lot.

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

4 participants