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

Problem with (free) testing framework

1 Answer 30 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
G S S
Top achievements
Rank 1
G S S asked on 02 Jun 2011, 10:08 AM
Hi,

This question is regarding the free testing framework (API).

I have the following code:

 

 

Settings settings = new Settings(BrowserType.InternetExplorer, @"C:\log.txt");

 

 

 

 

 

 

Manager manager = new Manager(settings);

 

 

 

 

manager.Start();

 

manager.LaunchNewBrowser();

 

 

 

Browser b = manager.ActiveBrowser;

 

 

b.NavigateTo(

 

"http://www.google.com");

However, it launches the browser but does not do anything thereafter. If I play with the code and modify it, I g et an exception stating wait condition timed out.

How do I make this code work (so that it will navigate to google etc)?

Thanks

 

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 02 Jun 2011, 07:19 PM
Hello Gurdeep,

Try this code instead:

// Initialize the settings you want used. 
Settings mySettings = new Settings(BrowserType.InternetExplorer, @"c:\log\"); 
    
// Create the manager object 
Manager myManager = new Manager(mySettings); 
    
// Start the manager 
myManager.Start(); 
    
// Launch a new browser instance. [This will launch an IE instance given the setting above] 
myManager.LaunchNewBrowser(); 
    
// Navigate to a certain web page 
myManager.ActiveBrowser.NavigateTo("http://www.google.com"); 
    
// Perform your automation actions. 
Element mybtn = myManager.ActiveBrowser.Find.ByTagIndex("input", 3); 
myManager.ActiveBrowser.Actions.Click(mybtn); 
    
// Shut-down the manager and do all clean-up 
myManager.Dispose();

You can find more information in our online user's guide to Getting Started with Telerik Testing Framework.

Best wishes,
Anthony
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
G S S
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or