This is a migrated thread and some comments may be shown as answers.

Is there a trick to GetSelectedText()?

1 Answer 43 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ryan Niemeyer
Top achievements
Rank 1
Ryan Niemeyer asked on 08 Nov 2011, 10:22 PM
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?

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();
 

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 11 Nov 2011, 09:22 PM
Hi Rp Niemeyer,

I saw the same behavior in my testing and I filed a bug report for it. You can find the PITS Issue here: Public URL
 

Regards,
Anthony
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Ryan Niemeyer
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or