I need to know how to get the Process ID of the app for a given Adapter
WebDocument wd1 = Host.Local.FindSingle<WebDocument>(new Ranorex.Core.RxPath("/dom[@domain='FOO']"), NUnitHelper.RanorexSearchTimeout);
How do I get the PID of the browser?
This could easily be a Form or some other item, not just restricted to browsers, we have several apps open and I want to know which process I am going to act on when I manipulate the adapter.
- Jason
How to get PID of app an adaptor is in?
Re: How to get PID of app an adaptor is in?
When you start the browser the Host.Local.OpenBrowser() method will return the PID. It is the same with any other application startup in Ranorex, using Host.Local.RunApplication() or Host.Local.RunMobileApp().
You will need to do this in user code.
Code: Select all
string BrowserProcessID = Host.Local.OpenBrowser(url, browser, browserArgs, killExisting, maximised).ToString();
Shortcuts usually aren't...
Re: How to get PID of app an adaptor is in?
It's not really what I asked.. I have an adapter could be from a browser or something else..krstcs wrote:When you start the browser the Host.Local.OpenBrowser() method will return the PID. It is the same with any other application startup in Ranorex, using Host.Local.RunApplication() or Host.Local.RunMobileApp().
You will need to do this in user code.Code: Select all
string BrowserProcessID = Host.Local.OpenBrowser(url, browser, browserArgs, killExisting, maximised).ToString();
say Unknown foo
I want to know the process of the UI element foo is an adapter for , All I have is Foo
Re: How to get PID of app an adaptor is in?
The method I mentioned is probably the best way to do it.
However, there may be another way.
The webdocument object has a "Browser" property that holds a reference to the form containing this dom. You might be able to use that to find the PID, but I'm not seeing anything in the documentation.
(We're currently rebuilding the system that I have my license server on so I can't test it...)
However, there may be another way.
The webdocument object has a "Browser" property that holds a reference to the form containing this dom. You might be able to use that to find the PID, but I'm not seeing anything in the documentation.
(We're currently rebuilding the system that I have my license server on so I can't test it...)
Shortcuts usually aren't...