Telerik Forums
Testing Framework Forum
16 answers
167 views
Hi Telerik support,

I found a problem in the latest WebAii (as far as I can tell) which I'd like to report. One of our customers has a web page with this very clean and valid HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<frameset cols="*">
<frame name="topFrame" id="topFrame" src="test.html" frameborder="0" scrolling="auto" style="overflow-x: hidden">
</frameset>
</html>

After loading this page in a browser (IE8 or IE9) (i.e. after browser.NavigateTo), the browser.Frames collection is empty, which is unexpected.

browser.RefreshDomTree doesn't help (returns false in fact), and browser.Refresh() (which I don't really want to do as it influences my test) usually doesn't help, but occasionally it does and browser.Frames contains one frame (as expected).

As far as I know, this problem doesn't occur (as frequently) in Telerik Testing Framework 2010.1, but I can reproduce it 100% of the time in 2011.1.

I know that the setup of such a page isn't very useful, but the content of the page is beyond my control, and I do need to test the correctness of the page. Similar pages from other customers behave in the same way. This is turning into a big problem for us, so I hope you can try to figure it out and provide a solution. Thanks guys, I appreciate it.
Cody
Telerik team
 answered on 17 Oct 2011
1 answer
131 views
Hi, I'm using WebAii and now I have problem: how to open autocomplete from jquery ui. Now I have the following code:
nipTextBox.MouseClick();
browser.Desktop.KeyBoard.TypeText(nip);                 
browser.RefreshDomTree();     
            
var
 ul = browser.Find.jQuery().classes("ui-autocomplete").last<HtmlUnorderedList>();
var a = ul.AllItems.First().Find.jQuery().child().first<HtmlAnchor>();                 
a.MouseClick();

Unfortunatle autocomplete menu doesn't appear.

Cody
Telerik team
 answered on 17 Oct 2011
7 answers
130 views
Hi,

We have the following problem. Some webpages contain particular HtmlControl elements (in my example below, an HtmlAnchor) for which we can find a reference without any problems (using browser.Find.ByExpression<>), but when we call .Click() on that element, the click event seems to end up on a completely different element in the DOM. We notice this because the browser ends up loading a URL that corresponds to a different HtmlAnchor in the document, which causes our scenario to fail. Obviously this is a big problem for us.

The strange thing is that this issue seems to be timing related. Please consider the following code fragment:

           
browser.NavigateTo("http://example.com");
 
// Do some simple interaction with the page,
// e.g. using textboxes and buttons to log into the website
// [code omitted]
 
 
// Problem occurs here:
// WITHOUT this Sleep statement, the following .Click() is executed correctly.
// WITH this Sleep statement, the .Click() ends up on the wrong DOM element
Thread.Sleep(4000);
 
var link = browser.Find.ByExpression<HtmlAnchor>("href=some-href-value-in-the-page");
link.Click();



With the delay caused by the Thread.Sleep statement, or just by setting a breakpoint and breaking in the debugger, or some other delay or timing dependency, the link.Click causes the browser to load a completely different URL.

Just to be clear: the link variable does have a reference to the correct element; it’s the .Click (or indeed any other interaction with that element) that ends up being executed on a different DOM element.

Other details:
-    Same problem occurs when I use a different Find method to find the element
-    I suspect that this happens for other HtmlControls as well
-    I’m using Telerik Testing Framework (2011.1.712) – Framework Only version
-    I’m using combinations of Internet Explorer 8/Windows 7/Windows 2003/Windows 2008

I have a very small example project that reproduces the problem on the website of one of our customers. Since the project contains some sensitive login info, I’m not comfortable posting the project here. Can I send the project via Dropbox or email?

Thanks for your continued support, we appreciate it.

Regards,

JP
Stoich
Telerik team
 answered on 17 Oct 2011
3 answers
144 views

Hi, I am using upload file dialog to upload files. the upload file dialogs exist in multiple pages. when the dialgo opens, however, sometimes it uses the previous file path from UI. do I do anything wrong? I have debugged and the filePath is correct but from UI I can see the actual file path entered in the dialog is from previous page's upload file dialog. I am using IE8. Thanks!

 

FileUploadDialog

 

 

uploadDialog = new FileUploadDialog(manager.ActiveBrowser, filePath, dismissButton, dialogTitle);

 

manager.DialogMonitor.AddDialog(uploadDialog);

manager.DialogMonitor.Start();

browsebutton.Click();
 

uploadDialog.WaitUntilHandled(5000);

manager.DialogMonitor.Stop();

manager.DialogMonitor.RemoveDialog(uploadDialog);

Anthony
Telerik team
 answered on 13 Oct 2011
2 answers
83 views
Hi,

I have a scenario where I click on a link it opens a new browser which is not a child browser. I am not able to get hold of that new browser opened and webaii does not understands/learns the new browser opened.

I tired using "Manager.SetNewBrowserTracking(true);" but no luck.

sample code :
// to open the new browser
browser.Page.elements.AddLink.Click();
// Track the browser
 Manager.SetNewBrowserTracking(true);
//Click on the Cancel button on new browser opened
browser.newpage.elements.Canclebutton.click();

Getting the below error:
"Test method SandBox.JDSection threw exception:
ErrorHandling.WrongPageException: Method/Property only valid on /admin/add_questions.aspx?
Currently on https://<<Domain>>/display_form.aspx?form_id=649&form_type=1&position_id=1&display_type=preview".

Please suggest some inputs. I am struck at this point.

Thanks & Regards,
Mahendra
Plamen
Telerik team
 answered on 13 Oct 2011
1 answer
104 views
Hi ,

I have successfully installed the Telerik Test Studio ( 2011_2_928_Trial.msi ) on my local machine and also on a remote VM running Windows 2008 R2 and I have a mix of Coded UI tests and Telerik Web tests in my solution.  In my solution , I have set my active test settings for Remote Execution.

I have tested the agent controller mechanism and it works absolutely fine. When trying to execute a coded ui test remotely , I get the message Failure to Queue test run: Unable to load assembly ArtOfTest.WebAiiVSIP.....problem. This is a problem which has already been reported in the forums but I havent found any mention about the interference of the telerik installations with non-telerik tests.

To test this , I uninstalled Telerik and executed the coded ui test again. This time, the remote execution worked perfectly.

Is this a known problem?

Regards,
Rahul
Cody
Telerik team
 answered on 12 Oct 2011
3 answers
68 views
Hi ,

I am currently evaluating the Telerik R1 2011 Trial version and have recorded a Silverlight web test for the Telerik Scheduler component. I am using the http://demos.telerik.com/silverlight/#Scheduler/FirstLook as the application under test. I click on the Week selection and try to enter a new appointment using the Appointment dialog. I make selections on the 3 RadComboboxes in this dialog (Speaker , Level & Session Room).

During playback (I am using IE 8) , i observe that the selection in the Speaker combobox is performed successfully. However , the tool is unable to perform the selections in the subsequent comboboxes i.e. Level & Session Room although it marks these steps of the test as PASSED.

I tried running the test till the first combobox selection using the "Run to here" option. I observed that for some reason the Speaker combobox is not restored to its original state after the selection is made. It still remains open. I then manually closed the combobox and tried to resume the test from there. This time the selections were performed successfully.

Adding delays doesnt solve the problem and I can consistently reproduce it.

Regards,
Rahul
Anthony
Telerik team
 answered on 07 Oct 2011
1 answer
85 views
Hi
Sorry if these are basic questions but I'd appreciate any  answers :
1) What's the difference between Art of Test, and the Telerik Testing Framework?
2) To what degree can I expect tests recorded by MS Test Runner (in Microsoft Test Manager) of a page with Telerik ASP.NET Ajax controls to run correctly in Visual Studio Ultimate? Is there a list anywhere of what works and what doesnt? (I know for example that there are problems with RadFormDecorated check boxes.)
3) Do you basically need to use Art of Test/Telerik Testing Framework if you want to do WebUI testing with the Telerik  ASP.NET Ajax controls ? Is there any documetation on using VS2010 Web UI testing with Telerik ASP.NET Ajax controls ?
I've been building up some tests using MTM and VS 2010 Ultimate and am starting to get concerned that my Telerik controls are going to get in the way of me using Test Runner to build my tests interactively: I'm afraid I'm not going to be buying the full copy of Test Studio and would be disappointed if this was effectively Telerik's solution.

Jim
Telerik team
 answered on 06 Oct 2011
3 answers
160 views
Hi,

I am trying to test the Silverlight toolkit samples application http://www.silverlight.net/content/samples/sl3/toolkitcontrolsamples/run/default.html and wish to click the last leaf node on the last treeitem of the treeview on the left hand side of the page. (this is the WrapPanel node under Toolkit)

Unless the node is in the visible scrollview , the tool is not able to click on the application. Is there a way by which the tool can automatically do this without having the need to scroll?  When a treeview has a dynamic size and one doesnt know where in the scrollview the treenode to be clicked on can be , I would consider an out-of-the-box feature such as this to be a valuable one to have.

Regards,
Rahul
Anthony
Telerik team
 answered on 05 Oct 2011
6 answers
178 views
Hi Guys, 

As relaying on elements' ID can be a risky business I've tried to use an alternative and tried 'Find.ByContent'

After running the following code
Console.WriteLine(Manager.ActiveBrowser.Find.ById<HtmlTable>("assessmentForm:permitsTable").InnerText);
I getting the attached result in Nunit. 
So I've figured out I could use which failed. 
Manager.ActiveBrowser.Find.ByContent<HtmlTable>("l:Permit", FindContentType.InnerText).IsVisible();
Variations of the string content (p: etc..) and FindContenctType failed as well...
Any idea ? 
ta. 



Cody
Telerik team
 answered on 05 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?