Telerik Forums
Test Studio Forum
8 answers
412 views
I am using the trial edition of TeleikTest Studio 2012.2.1204.0 with Firefox 17.0.1 in windows 7. There is a key Iframe and tabbed target iframes. The error log is as follows.

Overall Result: Fail
------------------------------------------------------------
'03-01-2013 12:48:39' - Using .Net Runtime version: '4.0.30319.269' for tests execution.
'03-01-2013 12:48:39' - Starting execution....
'03-01-2013 12:49:02' - Detected custom code in test. Locating test assembly: SubjectLookup.dll.
'03-01-2013 12:49:02' - Assembly Found: C:\Users\avvenn\Desktop\SubjectLookup_Old\bin\SubjectLookup.dll
'03-01-2013 12:49:02' - Loading code class: 'SubjectLookup.Subject_Test_2'.
------------------------------------------------------------
------------------------------------------------------------
'03-01-2013 12:49:02' - Enabling Html Popup Tracker. Test expecting Popups.
'03-01-2013 12:49:02' - Using 'FireFox' version '17.0.1' as default browser. 
'03-01-2013 12:49:11' - LOG: Unexpected dialog encountered. Taking no action.
'03-01-2013 12:49:11' - LOG: Unexpected dialog encountered. Taking no action.
'03-01-2013 12:49:14' - 'Pass' : 1. Navigate to : 'http://mytestapp/'
'03-01-2013 12:49:14' - 'Pass' : 2. Handle 'Logon' dialog.
'03-01-2013 12:49:16' - 'Pass' : 3. Navigate to : 'http://mytestapp/'
'03-01-2013 12:49:21' - 'Pass' : 4. Navigate to : 'http://mytestapp/Contoso/main.aspx'
'03-01-2013 12:49:21' - 'NotRun' : 5. Navigate to : 'http://mytestapp/Contoso/main.aspx'
'03-01-2013 12:49:21' - 'NotRun' : 6. Navigate to : 'http://mytestapp/Contoso/main.aspx'
'03-01-2013 12:49:26' - 'Pass' : 7. Wait for '5000' msec.
'03-01-2013 12:49:31' - 'Pass' : 8. Wait for '5000' msec.
'03-01-2013 12:49:36' - 'Pass' : 9. Wait for '5000' msec.
'03-01-2013 12:49:37' - 'Pass' : 10. Click 'SettingsNobrTag'
'03-01-2013 12:49:38' - 'Pass' : 11. Click 'BusinessNobrTag'
'03-01-2013 12:49:39' - 'Pass' : 12. Click 'A10Link'
'03-01-2013 12:50:10' - 'Fail' : 13. Click 'AddASubjectLink'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=ViewArea,name=ViewArea,src=http://mytestapp/subjectmanager/subjecteditor.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=ViewArea,name=ViewArea,src=http://mytestapp/subjectmanager/subjecteditor.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)
------------------------------------------------------------
'03-01-2013 12:50:10' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'03-01-2013 12:50:10' - Overall Result: Fail
'03-01-2013 12:50:10' - Duration: [1 min: 8 sec: 337 msec]
------------------------------------------------------------
'03-01-2013 12:50:12' - Test completed!

this is working fine IE9 but failing in Firefox and Chrome(version 23.0.1271.97).

Then i worked on this problem,

Click on "AddASubjectLink " will open a model popup, now i removed the base url (according to one of the telerik solution which i find in this forum link for that solution is "http://www.telerik.com/automated-testing-tools/ClientsFiles/197551_framesettings.jpg") from the Frame in which AddASubjectLink is there, then this step passed but model popup was not opened. So now next step connecting to the popup is failing because popup was not opened on click of "AddASubjectLink".

.
Boyan Boev
Telerik team
 answered on 23 Jan 2013
1 answer
128 views
I have a drop down while selecting the drop down i am facing below java script exception, i could not find what was the reason behind this test case failure.

See the below log for the reference:
'23-01-2013 15:27:35' - 'Pass' : 11. Wait for '3000' msec.
'23-01-2013 15:27:36' - 'Fail' : 12. Select 'ByText' option 'Main Phone' on 'Selector11Select'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'target': object is null or undefined 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()',ClientId:'Client_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'target': object is null or undefined 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'target': object is null or undefined 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()',ClientId:'Client_1c6001b8-7745-4671-bcbb-ce305fcb41e3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.InvalidOperationException: Javascript call [function fireChanged(){var el=document.getElementsByTagName(\'select\')[0]; if(el._events == null || el._events.change == null){return;} var hndlr = el._events.change.length;for(i=0; i<hndlr;i++){el._events.change[i].handler();}}fireChanged()] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Unable to get value of the property 'target': object is null or undefined 
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJSON)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   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.InvokeScript(String script)
   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.InvokeScript(String script)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlSelect.InvokeOnChange()
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlSelect.SelectByText(String text, Boolean invokeOnChangeEvent)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SelectDropDownActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

Can you please guide me what can be done to make the test case work?


Plamen
Telerik team
 answered on 23 Jan 2013
1 answer
152 views
I'm trying to find a way to record mouse movements and be able to play them back in the Web testing tool. Is such a thing possible?
Boyan Boev
Telerik team
 answered on 22 Jan 2013
1 answer
166 views
Hi,

  In my form I have a mandatory field. I am entering the text into the field and saving my form while recording.

But while playback, text is being entered into the text box but  on-click of "save" an validation message is shown saying field shouldn't be empty.

But if I set "SimulateRealTyping" to true then it is working. Is there any way or work around where we can execute without simulating real typing?

Here is the code :
I used both the codes but none is working.
1. Actions.SetText(Pages.FaxNewMicrosoft0.FrameContentIFrame.SubjectText, "Test Fax");
2.Pages.FaxNewMicrosoft0.FrameContentIFrame.SubjectText.Text="Test Fax";


Thanks
Bhaskar
Plamen
Telerik team
 answered on 22 Jan 2013
6 answers
425 views
(Silverlight)

Anyone have experience using EXTRACT to pull a data vlaue into a variable and then writing code to compare that extacted value against data in another field?

Ex.
Field A
Field B

I need to compare Field B value to what was entered in Field A. If Field B > than Field A, I need to verify that an error message is thrown back on Field A. Silverlight uses a control that outlines the field in red and then presents the error on hover over the upper left corner of the input box.

Telerik Support suggested using Extract during recording and then writing code to compare the values as intergers in  a coded step. I'm still not able to verify that an error message is thrown if Field B > Field A.



Plamen
Telerik team
 answered on 22 Jan 2013
12 answers
617 views

I have a Silverlight application the outputs “Hello, World!!” when run.  I successfully wrote a test and used the “Quick verification” to verify the text “Hello, World!!” Success.  It worked.

 

The problem is, let’s say the application is recompiled to display “Hello, Telerik!!”  In Test Studio, I go to my test step and modify the value expected to be “Hello, Telerik!!”  I run the test.   The Silverlight application opens up with “Hello, Telerik!!”.  The problem is the test fails.

 

This is a simple example.  Throughout my application at work, I need to verify data in textboxes or labels where the values are dynamic.  Based on the environment/scenario that the application is run, the textbox will have a different value.  Therefore, I convert the verification step into a coded step.  In this case, Test Studio recognizes the label as
Pages.PracticeTextBox.SilverlightApp.HelloWorldTextblock.Text

 

The problem is that this label should not be called a HelloWorldTextBlock.  Since, it may not have the value Hello World all the time.  I need to be able to verify text and data dynamically.  Please help! Code Attached.

Top Gun
Top achievements
Rank 1
 answered on 18 Jan 2013
2 answers
99 views
I am having a problem with the test studio run time where the test studio run time will stop & hang on server 2012 (IE10) when I Clear Browser Cookies. The screen capture attached has been sitting there for more then an hour.
Jon
Top achievements
Rank 1
 answered on 18 Jan 2013
3 answers
141 views
Hi,

We have two select inputs on a page. The second is populated when something in the first select changes (using jQuery .change() to listen for that).

We are trying to write tests for this page. In IE9, when we select something from the first list using "Select 'ByText' Option '<element in first select>' on '<name of first select>'", the .change() function never fires (even though the element does get selected), and the second select never gets populated with elements, which causes our test to fail.

This works perfectly in all browsers when we test them by hand. When we run the test in Chrome it works fine. Below is the javascript.

Any suggestions?

$("#firstSelectObject").change(function () {    
    $("#secondSelectObject").empty();
        var parms = { ... };
        var serverUrl = ...;
        $.ajax({ url: serverUrl, traditional: true, type: "POST", dataType: "json", data: parms,
            success: function (result) {    
   
                            $.each(result, function(val, text) {
                                addToSelectList(text);
			    });
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert( ... );
            }
        });
    }
});
Plamen
Telerik team
 answered on 18 Jan 2013
3 answers
79 views
I have created data driven test case with XML, in my XML file i have multiple rows when i execute this test case it was executing the test n times (equal to the no of rows in XML) but i want this test case to execute only once by taking one set of data randomly from XML File for each time.
 can you help me on the same?



Boyan Boev
Telerik team
 answered on 18 Jan 2013
4 answers
171 views
Hi,all
    When I have multiple test environments in which to execute my test scripts.I found that the operating system of the server was English. But I record my web test in Chinese operating system.So your can see the difference between it from the picture I upload.In these circumstances, I need to modify a lot of places to meet the changes of the operating system.How can I use one step to solve all the problems.
    Thank you for your help
Boyan Boev
Telerik team
 answered on 18 Jan 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?