Question

I'm working with Coded UI but found many issues trying to recognize many of the site components. So I'm trying with watIN but need to catch the already opened browser session in CodedUI, in watIN so I can start looking up for the site components.

i.e: This is the way I open a browser session when working with CodedUI

HtmlDocument browser = LoginScreen.NavigateToLogin(Url);

This just loads the URL -> BrowserWindow.Launch(url) and returns the HtmlDocument already logged in the system I'm using the CodedUIExtention (http://www.incyclesoftware.com/2013/03/build-a-coded-ui-test-without-a-ui-map/) to avoid using UImaps.

Now I need to catch that opened browser session with watIN instead of opening a new watIN session, that will cause all progress to get lost and open a watIN session from the very beginning is not an option.

Was it helpful?

Solution

Same basic answer as here: How to use WebAii and WatiN with Same Browser

  1. Open browser via coded UI
  2. do stuff with coded UI
  3. attach to browser
  4. in WatiN using .AttachTo() do stuff with WatiN

More on browser attachto is here: http://watinandmore.blogspot.com/2010/01/browserattachto-and-iattachto.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top