Telerik Forums
Testing Framework Forum
5 answers
152 views
Greetings and Salutations,

I have run into a rather aggravating issue with the framework. When I am dealing with Internet Explorer, the following code is able to invoke the HtmlInputFile control and accomplish the upload:

// Create the dialog listener
FileUploadDialog theDialog = new FileUploadDialog(waManager.ActiveBrowser, filePath, DialogButton.OPEN);
waManager.DialogMonitor.AddDialog(theDialog);
 
// Start the dialog monitor listening, then give it a chance to "breathe"
waManager.DialogMonitor.Start();
waManager.ActiveBrowser.WaitUntilReady();
 
// Now use the element
fileUploadControl.Upload(filePath, msecWait);
 
// Give the browser a moment to collect itself
waManager.ActiveBrowser.WaitUntilReady();
 
// Finally, turn the dialog monitor off after all is said and done
waManager.DialogMonitor.RemoveDialog(theDialog);
waManager.DialogMonitor.Stop();

This works both in Windows 7 and Windows Server 2008. The problem comes when I attempt to do the same with Firefox and Chrome. The HtmlInputFile.Upload function does not work in either of these browsers in Windows Server 2008, and does not work in Chrome in Windows 7.

So I searched the forums here and found a workaround:

// Create the dialog listener
FileUploadDialog theDialog = new FileUploadDialog(waManager.ActiveBrowser, filePath, DialogButton.OPEN);
waManager.DialogMonitor.AddDialog(theDialog);
 
// Start the dialog monitor listening
waManager.DialogMonitor.Start();
waManager.ActiveBrowser.WaitUntilReady();
 
// Now click the element and handle the dialog
fileUploadControl.MouseClick(MouseClickType.LeftDoubleClick);
theDialog.WaitUntilHandled(WAIT_Medium);
 
// Give the browser a moment to collect itself
waManager.ActiveBrowser.WaitUntilReady();
 
// Finally, turn the dialog monitor off after all is said and done
waManager.DialogMonitor.RemoveDialog(theDialog);
waManager.DialogMonitor.Stop();
  • The problem becomes now that while Firefox and Chrome both succeed running on Windows 7, they fail to run on Windows Server 2008. And now Internet Explorer won't respond on either version of the operating system.

I have tried this with the following versions of Telerik Test Framework installed:
2012.1.719

  • 2012.2.1204
  • 2012.2.1420

At this point I am at a loss of what to try next.

Please help.


P.S. A bit of background:  I am writing automated tests for three browsers: Chrome, Firefox and Internet Explorer. My desktop is a Windows 7 machine and where development occurs. Changes are committed to SCM. The automated tests are downloaded and built by a Windows Server 2008 instance from SCM. With the various versions of the framework I have made sure that I uninstall the previous version from both machines and cleanly installed the new, to make sure I did not run into any issues with version conflicts.

Mario
Telerik team
 answered on 08 May 2013
1 answer
103 views
Hi telerik team.

I want to compare the data for the same column in excel sheet.
I am adding the records in application using excel sheet, and i want to check the SSN number duplication.
If the SSN number is already exist for another patient then Fail should be displayed in excel sheet.
Please help me to find the solution.

Thanks......
Byron
Telerik team
 answered on 03 May 2013
1 answer
127 views
Hello,

I use NUnit to run tests using Test Framework methods. On a local machines tests work fine when I run them via resharper or nunit-console-x86.exe I have testing framework installed on my local machine.

I also want to run tests to CI machine without installation of Testing Framework. There will be multiple test projects created at a different time. I want each project to have its own set of test framework dlls for two reasons:
- to avoid potential compatibility problems of testing frameworks versions in a future.
- to let developers just get a copy of the test project and be able to run tests without installing anything.

I tried to copy all ArtOfTest.*.dll and Telerik.TestingFramework.Interop.dll from program files to my project folder. However, when I lunch tests on a CI machine without testing framework installed it opens IE with a blank page and shows error dialog with "RunDLL" title and "Error loading ArtOfTest.Connector.dll The specified module could not be found." text.

Is it possible to run NUnit tests which use testing framework without installing testing framework and just by copying framework's dll to a project folder?
Cody
Telerik team
 answered on 02 May 2013
3 answers
149 views
As i am running my test the system has to click on a tile button on the web page. The click happens the pages changes but Telerik Test Studio does not register the click and therefore does not move onto the the step. Here is a section of the log


'29/04/2013 1:28:24 PM' - 'Fail' : 21. Click 'SettingsPngImage'
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Wait for condition has timed out
InnerException:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ClickActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'29/04/2013 1:28:24 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------


Interestingly i have found that as it still "executing..."  the click  after it has really happened and before the time out if you hit the Esc key it will continue the test happily.

How can i get Telerik to know that that click has happened? I have tried with simulated click on and off and its the same story.


Plamen
Telerik team
 answered on 02 May 2013
6 answers
92 views
Hi,

I thought I had already reported this issue long time ago, but seemingly I haven't..

When there is multiple whitespace in a text like this

<span>That's the     text</span>

and you try to get this span with

browser.Find.ByExpression<HtmlSpan>("TextContent=That's the text");

it doesn't work, even if this is the text you will see on the website. All browsers ignore multiple whitespace in html, so I think the framework should also natively do so.

I solved it with custom GetInnerText()- and GetTextContent()- methods which automatically remove multiple whitespace and then convert &nbsp;.

Kind Regards
Silvio
Silvio
Top achievements
Rank 1
 answered on 02 May 2013
9 answers
162 views

Hi Telerik team,

We have used the RadMasked textbox control for home phone number field of Standard mask type.(___-___-____) which allow 10 digits home phone number and I want to calculate the Radmasked textbox length in coded step.

I have write the following code in script test.

object objhomephone= GetExtractedValue("RmtbHomePhoneNumberText");
int homephone= Convert.ToInt16(objhomephone.ToString().Length);
System.Windows.Forms.MessageBox.Show(homephone.ToString());

I m getting length 12 in message box without entering any digits in home phone number field.
How should i calculate the exact number of digits entered in the rad masked textbox??? 


Thanks,

Boyan Boev
Telerik team
 answered on 01 May 2013
1 answer
38 views
Hi All,

How to retrive the web list items from the application under test.

in QTP browser("browsername").Page("pagename").weblist("listname").getroproperty("items")
the above code will bring all the list box items available in the application

Pls provide simillar code in telerik


Thanks,
Chandra
Plamen
Telerik team
 answered on 30 Apr 2013
24 answers
287 views
I can't successfully run some tests in the Samples. Here is example of one:

        [Test]
        [Description("Setting the text for a textbox or a textarea")]
        [Find("MyTextBox", "id=textbox1")]
        [Find("MyTextArea", "id=textarea1")]
        public void SetTextForAnElement()
        {
            // Now set the text for the text box
            Actions.SetText(this.Elements.GetHtml("MyTextBox"), "This is a TEST for TextBox!");

            // Now set the text for the text area.
            Actions.SetText(this.Elements.GetHtml("MyTextArea"), "This is a TEST for TextArea!");

            // DO ANY TEST VERIFICATION HERE

        }

The code compiles OK, but when I run it as unit test I get error:

System.ArgumentException : The FindParam key 'MyTextBox' is not found. Please make sure that they key is defined as part of the FindParamAttributes set on the test method or class - c:\WebAii\QuickStarts_NUnit_CS\Tests\BrowserActions.cs:187

Why doesn't it work.

I use SharpDevelop if it matters.
Cody
Telerik team
 answered on 29 Apr 2013
3 answers
156 views
Hi,

how to handle IE modal Dialog> The dialog appears on clicking an HTMLDiV Element. In this case mouseclick() is not working. its not showing the iedialog when i use mouseclick but when i use click() it shows the IEdialog. but using click() its not navigating to IEDialog. It hangs..

Is it suitable to use click() to display IEDialog? mouseclick() is not opening the popup..  
Boyan Boev
Telerik team
 answered on 29 Apr 2013
1 answer
280 views
<div class="jsdomenuitem"................................ //parent
   Text - Aggregations
   <div class = "jsdomenuarrow" id = "menuitem209arrow"  //child

Hi,

I'm able to find the parent using Innertext property, by getting this i want to click the child. Child doesnt contain any innertext 
I'm able to find the child by using id=menuitem209arrow but there are many cases like this, so instead of finding the child directly, i want to find Parent  and they perform actions on child.

How to get the child by finding the parent?

Thanks
Sudarshan
Boyan Boev
Telerik team
 answered on 29 Apr 2013
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?