I hope that this is possibly a simple question. I am using 2011_2_9_28 and just trying to execute some tests that validate the selected text in the browser. I was unable to get it working.
Here is a basic console app that does not display text in any of the browsers that I tried. I would just launch it and then select various things on the page including text in the search box and GetSelectedText() is always empty. Am I using it wrong?
Here is a basic console app that does not display text in any of the browsers that I tried. I would just launch it and then select various things on the page including text in the search box and GetSelectedText() is always empty. Am I using it wrong?
Manager testManager = new Manager(false);
testManager.Start();
testManager.LaunchNewBrowser(BrowserType.InternetExplorer, true);
testManager.ActiveBrowser.NavigateTo("http://google.com");
for (int i = 0; i < 20; i++)
{
Console.WriteLine("Current: " + testManager.ActiveBrowser.GetSelectedText());
Thread.Sleep(1000);
}
Console.ReadLine();
testManager.Dispose();