Telerik Forums
Testing Framework Forum
1 answer
136 views
Hi,

1. I am trying to get the count of the Radpanelbar items. But i am getting Null reference exception sometimes as attached in the screenshot 1.
2. The same issue occurs when i am trying to fetch HtmlListItems. Please see attached scrrenshot 2.

The same code gives the exact Count/fetches HtmlListItems at times  and some times  gives a null reference exception. I am unable to understand this wierd behaviour.
Could you please help.

Thanks,
Satya
Anthony
Telerik team
 answered on 17 Jan 2012
5 answers
177 views
Hi All,

I am in trouble to recognize new Firefox browser window. I happens when I click on a button, there is another window appears, but Telerik testing framework cannot count the new window.

MANAGER.Browsers.Count = 1 (only see the parent window)

Please help.

Emily
Cody
Telerik team
 answered on 16 Jan 2012
17 answers
237 views
hi
i have a problem with download file by WebAii framworke.

i use this code

DownloadDialogsHandler fileDownloadHandler = new DownloadDialogsHandler(myManager.ActiveBrowser, DialogButton.SAVE, path, desktop);
myManager.ActiveBrowser.WaitUntilReady();
 
myManager.ActiveBrowser.Actions.Click(btnSalva);
fileDownloadHandler.WaitUntilHandled(30000);

so btnSalva is button that starts the dialog windows.

so the dialog windows is started, but after few second is closed without download nothing

where do  i mistake?

somebody help me with sample code

thanks
Anthony
Telerik team
 answered on 16 Jan 2012
1 answer
214 views
Hi,
I am trying to figure out how I can obtain element from another element.
Let's say I already found some element, e.g. <div> container, like this:
Element divPanel = ActiveBrowser.Find.ById("div1");
Now, I need search another element, .e.g. <a> which is inside this <div> container. Moreover this <a> element can not be direct child of <div> element, and can be located more deeper.
So, when I try such code to find this <a> over Xpath expression:
Element anchor = divPanel.Find.ByXPath("//a");
But, in such case I receive first anchor on the page instead of first anchor inside divPanel element.
As I understand all Find.ByXXX methods perform search starting from root page object.
So my question is - how can I use Find.ByXXX methods to start search from specified Dom node ?

Thanks.
Anthony
Telerik team
 answered on 16 Jan 2012
7 answers
101 views
Hi,
Today, I use MouseClickType.LeftDoubleClick to test out silverlight app, but it doesn't work.
Our requirement is that double click the left key of the mouse on the content of one textblock, the content will be filled in another textbox, here is my test code:
silApp.FindName("ExpandSite").Find.ByName("ExpandSite").Find.ByName("textBlock").User.Click(MouseClickType.LeftDoubleClick,
new System.Drawing.Point(20, 20));

But during execution, the content can not be filled into the defined textbox.
However, if I double click the left key of the mouse manually, the content can be filled in the textbox. So I need your help! thanks!!



Anthony
Telerik team
 answered on 13 Jan 2012
8 answers
190 views
Hi all,
Download dialog works fine with IE, but I cannot get it with Firefox, Chrome and Safari. It cannot save the file with the following code as below:

//launch
                 BROWSER = MANAGER.ActiveBrowser; FFOpenDownloadDialog ffdownload = new FFOpenDownloadDialog(                         BROWSER,                         DialogButton.SAVE,                         Desktop);                         MANAGER.DialogMonitor.AddDialog(ffdownload);                         MANAGER.DialogMonitor.Start();         //Invoke the dialog                        BrowserNavigateTo(strURL);                         //save                         BROWSER = MANAGER.ActiveBrowser;                         SaveAsDialog saveas = new SaveAsDialog(                             BROWSER,                             DialogButton.SAVE, strFileLocation, MANAGER.Desktop);                         MANAGER.DialogMonitor.AddDialog(saveas);                         MANAGER.DialogMonitor.Start(); Please help. Thanks, Emily
Anthony
Telerik team
 answered on 13 Jan 2012
14 answers
271 views
Set UseHttpProxy=true and then do this:

ActiveBrowser.NavigateTo("https://www.tradingfloor.com/accounts");

 Depending on security settings and the SSL certificate installed, the page either doesn't load or displays a security warning in IE instead of loading the page. If you turn off UseHttpProxy, it works. The security warning can be worked around, but not when the page doesn't load at all.

This gets worse with a self-signed SSL certificate, which we use in our test environments (where we need to run the tests!). Here, the page doesn't load at all and so we can't test anything related to SSL.

The error is seem in IE8 and Latest build, 2011.2.1303. Interestingly, it works fine in FF.

Kind regards
Saxo Bank A/S

Claus Topholt
Anthony
Telerik team
 answered on 13 Jan 2012
1 answer
131 views
Hi,
I am new in this area. Pls help me with this problem.
I have a div like below:
<div>
    Hello
    <br/>
    world
</div>

How can i find above <div> by using Manager.Current.ActiveBrowser.Find.ByContent<HtmlDiv>("Hello<br/>world")
It's alway return null
If remove <br/> --> find.ByContent("Hello world") --> it's ok

Thanks in advance

Anthony
Telerik team
 answered on 12 Jan 2012
16 answers
401 views
Hi,

I am trying to automate IE9 using webaii, by compiling on a amd64 architecture. The browser window opens up but does not navigate. I get the error listed below. If I complie using x86 architecture, it works fine. Is there a known compatibilty issue with xmd64 and Ie9 ?

Thanks

Error:

FAIL: Exception: System.ApplicationException: Exception thrown attempting to launch Internet Explorer. Please make sure Internet Explorer is properly installed and you are able to launch it. ---> System.NullReferenceException: Object reference not set to an instance of an object. at ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr, IntPtr& hookId) at ArtOfTest.Common.Win32.WindowManager.Attach(IntPtr& handle, Boolean findTabWindow, Boolean loadClr) at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename) --- End of inner exception stack trace --- at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.LaunchNewBrowserInstance(Int32 timeout, ProcessWindowStyle windowStyle, String pipename) at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments) at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle) at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect) at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch)
Cody
Telerik team
 answered on 11 Jan 2012
1 answer
150 views
I see the following error:

Test method TracerStuff.TracerStuff.WebTest1UnitTest.SampleWebAiiTest threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.

<TestMethod()> _
Public Sub SampleWebAiiTest()
    ' Launch a browser instance
    Manager.LaunchNewBrowser(BrowserType.InternetExplorer)
 
    ' The active browser
    ActiveBrowser.NavigateTo("http://www.google.com")
 
    ' Find the google search box and set it to "ArtOfTest";
    Find.ByName(Of HtmlInputText)("q").Text = "ArtOfTest"
 
    ' Click the Search button
    Find.ByName(Of HtmlInputSubmit)("btnG").Click()
 
    ' Validate the search contain the 'ArtOfTest' text
    Assert.IsTrue(ActiveBrowser.ContainsText("ArtOfTest"))
End Sub


Any idea's?

John
Anthony
Telerik team
 answered on 09 Jan 2012
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?