Before explaining this article/tip, I assume that the reader is well aware of WaTiN and White Framework (refer to the below link to roll your eyes with WaTin and White framework).
Being automation engineers sometimes while automating web applications, we have to pass the browser control from one framework to another to perform some additional action/task on the target application.
Okay, so let's talk about some real time scenario.
To automate web applications, I highly concentrated on WaTin framework, as I'm good at that. But sometimes, I have to pass browser control from WaTin to White (framework for Windows application) to get focus of open browser or to bring the Browser on User Focus and/or user wants to Click at some particular coordination of browser. For that the white framework is much more comfortable for doing this.
To know more about White, you can refer to my link posted on this site:White: An UI Automation tool for windows application
And to know more about WaTin framework, you can refer to the below link.http://watin.org/
Okay, so now come to the coding part. To achieve this, below is the piece of code doing the same.
I have commented each line of the code to get a clear picture about the logic of the code written. And I think rest of the things are self-explanatory.
readonly IE _browser = new IE();
public void AutomationUsingWaTin()
private void PerformActionUsingWhite()
var app = White.Core.Application.Attach(_browser.ProcessID);
var windows = app.GetWindows();
if (windows.Count == 1)
window = windows;
window = White.Core.Desktop.Instance.Windows().Find(w => w.Title.Contains(_browser.Title));
var point = new System.Windows.Point(400, 500);
catch (Exception ex)
Feel free to provide your valuable feedback and suggestions.