Telerik Forums
Test Studio Forum
7 answers
314 views
Hello,

While evaluating the latest available release of Test Studio (2012.2.1420.0) for possible upgrade from our current version (2012.1.411.0),  I noticed that the behavior of Type command (typing text into an input field) has changed in the scenario where the Type command is replacing existing text in the field.  Both versions clear out the field before typing into it (without needing explicit commands to do this) - however, the clearing mechanism seems to be different between the two versions.  Our current version instantaneously blanks out the field while the new version goes to the end of the string and backspaces all the way up to the start. 

Note, all the above is with SimulateRealUser set to true - which we want to keep for typing in the new value.

The new behavior will greatly increase running time of many of our tests - especially those that do heavy text input and/or if the previous strings are really long (think of a test which is testing error handling - one of which is max length of string which can be as high as 255 characters). 

I know of a few solutions to this issue - but none of them are ideal for us:
a) Record a step to type in blank string (or select and clear the string) before typing in the next value.  This is not ideal as it will require massive changes (we use Type a lot in our tests). 
b) Go to coded step and clear the field before typing into it.  This is not ideal for the same reason as above and also we will end up with a LOT of coded steps (something we are trying to limit).
c) Turn off SimulateRealUser.  Not ideal as we want to simulate real user for typing in the new value.  Reasons for the other two options also apply to this option.

I am assuming this is by design.  If so, I was wondering if there was any other way to restore the old behavior without modifying a lot of tests.  Please let me know if this is a bug that has been/is being addressed.

Thanks,
Shashi 
Boyan Boev
Telerik team
 answered on 03 Dec 2013
7 answers
324 views
Hello,

I m having the following issue:
(1) I cannot playback the step of clicking on a calendar icon. I went to view source and checked the name and id of the calendar. The name and id of calendar are changing everytime. If at all I am able to click the calendar I cannot playback the step of selecting a different year.

Can I somehow set the date without actually clicking on the calendar and selecting a date? The text field beside the calendar is read only.

I m new to Telerik. Please help.


P.S. Please see below the error that I get.

Failure Information: ~~~~~~~~~~~~~~~Unable to locate element. Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' image289] AND [tagname 'Exact' img]Unable to locate element. Search failed!Element was found by backup search only! We recommend editing the element to correct the primary find expression. Backup search: 'xpath=/html[1]/body[1]/form[1]/table[1]/tbody[1]/tr[1]/td[1]/div[2]/table[1]/tbody[1]/tr[43]/td[2]/p[1]/a[1]/img[1]'



Thank You,

Vaishali

Vaishali
Top achievements
Rank 1
 answered on 02 Dec 2013
1 answer
247 views
Hi,

I am facing an issue with a generic dialog, not able to do actions on it from my code, please find my code below, this is unit test code generated using Test Studio. When I run the recorded test (*.tstest) from VS plugin, the original source from which I generated the code it works. Also attaching the screenshot of the dialog.

GenericDialog RowDelete = new GenericDialog(ActiveApplication, "Delete", true, "");

RowDelete.ButtonText =

"Cancel";

Manager.Current.DialogMonitor.AddDialog(RowDelete);

Console.WriteLine("Delete dialog text : " + RowDelete.ButtonText);

RowDelete.WaitUntilHandled(5000);

 

/*****************************************/
I am getting following error,
/*****************************************/

System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1'
Result StackTrace: 
at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount)
   at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 handleCount, Int32 timeout, Boolean resetHandleCount)
   at

 

Kindly help me, thanks in advance.

Regards
Chery Jose

 

Velin Koychev
Telerik team
 answered on 02 Dec 2013
3 answers
99 views
Hi 
I need to extract the content of textcontrol and other control from code behind and store it for later use for comparing in subsequent test cases.
  
I searched all around but didn't get any solution.
  
for the time being I am using following code to extract the content.
  
txtNewcontent = Pages.WebApp.SilverlightApp.TxtCustomtextbox.Text
  
Similarly I am storing all controls data for comparision.
Let me know if there is any better way to do it.
Boyan Boev
Telerik team
 answered on 02 Dec 2013
1 answer
198 views
When I try to set text to field, Test Studio returns error: Unable to determine the type of 'maskedinputtextbox' element.
I'm using Infragistic XamDateTimeInput control on my silverlight app. This control contains masked input textbox and toogle button to expand calendar.
How can I resolve this problem?

'Fail' : 23. Set text contents of PARTInputTextBoxMaskedinputtextbox to '2013-12-03'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Unable to determine the type of 'maskedinputtextbox' element. Check the log for details.
InnerException:
System.ArgumentException: Unable to determine the type of 'maskedinputtextbox' element. Check the log for details.
   w ArtOfTest.WebAii.Silverlight.FrameworkElement.CastAs[T]()
   w ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.TextBoxSetTextActionDescriptor.Execute(IApplication hostApp)
   w ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)
   w ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------

the log file in attachements
Boyan Boev
Telerik team
 answered on 02 Dec 2013
10 answers
843 views
Hello,

Is the Scroll To Visible command supposed to work with horizontal scroll bars (scrolling from left to right and vice-versa)?  If so, what option should we use? (neither seems to be appropriate for horizontal scroll bars).

If Scroll to Visible does not support horizontal scroll bars, are there any other commands available for horizontal scrolling?
NOTE:  Recording a scroll action produces a drag command on BackgroundGradientRectangle object - problem with this is that it is very sensitive to screen resolution, browser window size, etc.

The above is both with our current version (TS 2012.1.411.0) and the version we are evaluating (for possible upgrade) - 2012.2.1420.0.  AUT is a Silverlight web application.

Any help would be much appreciated.

Thanks,
Shashi
Ivaylo
Telerik team
 answered on 29 Nov 2013
1 answer
91 views
There is an issue which annoys me every now and then is, in my project when I run the test live the steps do not work as recorded. The feature is a normal button which i tried walking over using the option of Desktop Cmmand(left click) and the Normal Click each. But the results indicate a test failure.
Find the logs using
a) Desktop Command
b) Normal Click
respectively

'11/28/2013 2:25:50 PM' - 'Fail' : 46. Desktop command: LeftClick on PerformImage
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=frameDyn,name=~Frame,src=https://sample-dev.t-sample.com/sample/GENERAL/sample.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=frameDyn,name=~Frame,src=https://sample-dev.t-sample.com/sample/GENERAL/sample.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'11/28/2013 2:25:50 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'11/28/2013 2:25:50 PM' - Overall Result: Fail
'11/28/2013 2:25:50 PM' - Duration: [4 min: 23 sec: 636 msec]
------------------------------------------------------------
'11/28/2013 2:25:51 PM' - Test completed!s

********************************************************************************************************************************************************************


'11/28/2013 2:40:03 PM' - 'Fail' : 47. Click 'PerformImage'
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=frameDyn,name=~Frame,src=https://sample-dev.t-sample.com/sample/GENERAL/sample.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=frameDyn,name=~Frame,src=https://sample-dev.t-sample.com/sample/GENERAL/sample.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'11/28/2013 2:40:03 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'11/28/2013 2:40:03 PM' - Overall Result: Fail
'11/28/2013 2:40:03 PM' - Duration: [4 min: 11 sec: 945 msec]
------------------------------------------------------------
'11/28/2013 2:40:05 PM' - Test completed!
Velin Koychev
Telerik team
 answered on 29 Nov 2013
2 answers
104 views
As the title says, my parent test is failing specifically on a FindElementException that the Subtest is catching.  Am I missing something?
My expected outcome would be for my test to carry on if I'm catching the exception that would otherwise fail the test.

Parent Test
->Execute test "SubTest.tsttest"

SubTest
// Click 'OverridelinkLink'
           try{
           Pages.CertificateError.OverridelinkLink.Click(false);
           }catch(FindException e){
           Log.WriteLine("IE Override Link not found");
           }

StackTrace
Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[checkForCertErrorIE] : Click 'OverridelinkLink''.
InnerException:
ArtOfTest.Common.Exceptions.FindElementException: Element Not found!
FindExpression used: 
[id 'Exact' overridelink] AND [tagname 'Exact' a]
Velin Koychev
Telerik team
 answered on 29 Nov 2013
1 answer
247 views
I am trying to add a reference to the System.Data.MySqlClient.dll file in Test Studio.  So far, it will not even recognize that it is there.  I am needed to connect to a MariaDB database.  Does someone have a suggestion on the best route for this?  The System.Data.SqlClient reference (obviously) will not work.

Thanks!!

Gregory Hargrove
Ivaylo
Telerik team
 answered on 28 Nov 2013
1 answer
311 views
Hello,

I'm new to this product and these forums so please bare with me :)  I have been consistently experiencing OutOfMemoryException issues when I run my script...I don't believe I have done anything out of the ordinary so I'm a little frustrated as this is my trial run and it's not going so well.

Notes
Executing Script from TestStudio standalone
roughly 720 rows are binded to MainTest
While Script is running, ArtOfTest.Runner.exe is exceeding 1,200,000 K in Memory...
Script is ran against IE 10
I have also used the 'Reuse App Window' property (changed from 0 to 50 and even tried 10 and still does not help memory leak)

Version
Build version is '2013.1.911.0'


Stacktrace
 ------------------------------------------------------------
'11/25/2013 12:05:19 PM' - Using .Net Runtime version: '4.0.30319.1008' for test execution. Build version is '2013.1.911.0'.
'11/25/2013 12:05:19 PM' - Starting execution....
'11/25/2013 12:05:22 PM' - Detected custom code in test. Locating test assembly: TestProject3.dll.
'11/25/2013 12:05:22 PM' - Assembly Found: C:\Users\mmanderachia\Documents\Test Studio Projects\HDUS\bin\TestProject3.dll
'11/25/2013 12:05:22 PM' - Loading code class: 'TestProject3.Main'.
'11/25/2013 12:21:26 PM' - Failure detected during execution. Details:
------------------------------------------------------------
'11/25/2013 12:21:26 PM' - System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at System.Text.StringBuilder.ExpandByABlock(Int32 minBlockCharCount)
   at System.Text.StringBuilder.Append(Char* value, Int32 valueCount)
   at System.Text.StringBuilder.AppendHelper(String value)
   at System.Text.StringBuilder.Append(String value)
   at ArtOfTest.WebAii.Design.Execution.TestResult.AddDataIterationResult(DataIterationResult result)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteDataDrivenTest(Test test, BaseWebAiiTest codeInstance)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteTest(Test test, TestResult initializationResult)
   at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
------------------------------------------------------------
'11/25/2013 12:21:29 PM' - Test completed!


Script
Here is how the script is structured...
Main Test (binded to Database) 
-> calls subTest
SubTest
->navigates to Url
->check if an element exists
->assert true/false


MainTest
// Execute test 'Verification'
           try{
           ExecuteTest("C:\\pathhToTest");
           }catch(NullReferenceException e){
           Log.WriteLine("NullRef");
           }catch(TimeoutException t){
           Log.WriteLine("Timeout exception....");
           }

SubTest
[CodedStep(@"Navigate to vanity url]")]
       public void SubTest_CodedStep()
       {
           // Navigate to : 'http://- DataDriven: [$(Vanity)].com/' - DataDriven: [$(test)]
           String vanity = ((string)(System.Convert.ChangeType(Data["Vanity"], typeof(string))));
           String fullUrl = "http://" + vanity + ".qasb5.com";
           Log.WriteLine("NAVIGATING TO: " + fullUrl);
           ActiveBrowser.NavigateTo(fullUrl, false);
 
       }
 
       [CodedStep(@"Verify element 'DealerLogoPanelDiv' 'is' visible.")]
       public void Verification_CodedStep()
       {
           // Verify element 'DealerLogoPanelDiv' 'is' visible.
           Log.WriteLine("starting test findDealerLogo");
           HtmlFindExpression expr = new HtmlFindExpression("id=~DealerLogoPanel");
 
           ActiveBrowser.WaitForElement(expr, 4000, false);
           Element e1 = ActiveBrowser.Find.ByExpression(expr);
           HtmlControl ctrl = new HtmlControl(e1);
           Assert.IsTrue(ctrl.IsVisible());
 
       }




I hope I provided enough information and would appreciate any help!
Mario
Ivaylo
Telerik team
 answered on 28 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?