Telerik Forums
Test Studio Forum
2 answers
183 views
Hi Telerik Team,

I am getting below error while inserting text textbox in FF but same code is working fine with IE.

Target '[Element: 'iframe:0'' is not a supported element to set text to. at ArtOfTest.WebAii.Core.Actions.SetText(Element targetElement, String text) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SetTextActionDescriptor.Execute(Browser browser) at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

What could be the reason?

Plamen
Telerik team
 answered on 16 May 2012
5 answers
135 views
Hi,

How can we send from local database (for testing data) a value to our bind t-sql param?

sample:

If this is my local db: (column name is TempMachineName)
Machine1
Machine2

select Id from [ActiveMachines] where Name = '$(TempMachineName)'

and then to use the scalar value for some locator on DOM element

Thanks,
Yohai 



Cody
Telerik team
 answered on 14 May 2012
3 answers
170 views
I was wondering if anyone knows a way to hook into an already running application to do records?

The issue that we are having is that our WPF application is launched via click-once, that requires a URI to launch the app.  I am able to navigate to the webpage that hosts the launcher, and launch the app, but I do not know a way to hook into the running version without having test studio try and launch a new version of the app (if that makes sense)

Any input would be helpful.

Thanks.
Anthony
Telerik team
 answered on 14 May 2012
1 answer
77 views
Hi all,

I'm new to telerik test studio. Kindly help me in providing the documentation or any tutorial so i can understand it & start to work on it as we have decided use this tool for automation.

Thanks & Regards,
Deepa.C
Anthony
Telerik team
 answered on 14 May 2012
3 answers
157 views
I'm using TestStudio Standalone Version, and I've created my own extension of BaseWebAiiTest to handle some extra logging behind-the-scenes by overriding the OnBeforeTestStarted and OnAfterTestCompleted events.  Since I want all of my tests to include that extra logging info, I was wondering if there was any way to configure ArtOfTest.Runner to use my CustomBaseWebAiiTest instead of BaseWebAiiTest.

I've modified "Project Settings→Recording Options→Code Base Class" to be my CustomBaseWebAiiTest class (both with/without its full assembly name) instead of BaseWebAiiTest, but all that appears to do is allow the Recorder to recognize any such classes as being associated with Tests.

On a side-note, when I go to add a Coded Step to a Test that does not yet have a code-behind class, it still creates that code-behind class as an extension of BaseWebAiiTest by default.  If I've modified the "Code Base Class" at all, then that extension needs to be manually changed to "CustomBaseWebAiiTest" outside of TestStudio to match the "Code Base Class"; otherwise it's unusable.  As such, I'd like to report that as a bug, since any code-behind files that TestStudio generates should match its current "Code Base Class".

Moving back on topic, the only way that I appear to be able to make tests use my CustomBaseWebAiiTest class it to explicitly create a code-behind class for each one of them which is an extension of said class.  My issue with that approach is that it means I'll be creating an essentially empty code-behind class for every single test that I have, which seems entirely unecessary and will add a lot of extra clutter to my Test Project.

All this having been said, is there any way that I can configure ArtOfTest.Runner to use whatever my "Code Base Class" is instead of always using BaseWebAiiTest by default?  If this is not currently possible, then I'd like to request it as an feature for TestStudio Standalone Version.

-Max
Anthony
Telerik team
 answered on 11 May 2012
1 answer
91 views
Case
Step:
- Add 1 sheet
- Back to sheet list screen
Expected result:
- Sheet name is displayed on list
(Ref below image)
*****Customize code
Public Sub test_CodedStep()
       Dim control_sheet_name as HtmlControl= Find.ByContent(of htmlControl)(Data("Col1").ToString())
                  if control_sheet_name isNot nothing then
                            'control_sheet_name.click(false)  
                            log.WriteLine(Data("Col1").ToString()&""&"is existence")
                            MessageBox.Show("Sheet name"&Data("Col1").ToString()& "is found","Information message")
                            
                    else
                            MessageBox.Show("Sheet name" &Data("Col1").ToString()&"is not found","Error message")               
                    end if  
            
        End Sub

        <CodedStep("Verify 'TextContent' 'Contains' 'A5' on 'A5PTag'")> _
        Public Sub test_CodedStep1()
            'Verify 'TextContent' 'Contains' 'A5' on 'A5PTag'
            'Pages.InachisGtMediaAnd1.A5PTag.AssertContent().TextContent(ArtOfTest.Common.StringCompareType.Contains, "A5")
                        Dim control_sheet_type as HtmlControl= Find.ByContent(of htmlControl)(Data("Col3").ToString())
                                
                                if control_sheet_type isNot nothing then
                                        'control_sheet_name.click(false)  
                                        log.WriteLine(Data("Col3").ToString()&" is existence")
                                        MessageBox.Show("Sheet type is found","Information message")
                                        
                                else
                                        MessageBox.Show("Sheet type is not found","Error message")
                                    
                                end if  
        End Sub
********************

Byron
Telerik team
 answered on 11 May 2012
1 answer
147 views

I was reading the documentation on data driven testing and I had a few questions in regards to data driven tests on multiple levels.

The User Guide gave an example of a data-bound test executing a test as step where the test inherited the parent's data. Is this possible to do when the parent test is using local data, too or does this only work with data bound from elsewhere?

In the case of a data-bound test calling another data-bound test, is it possible for the child test to still use values from the parent test?

Not quite related to data-bound testing, can a child test use values extracted in a parent test using the extract feature?

It doesn't matter if it has to be coded or not, I just want to know if it's possible.


Thanks in advance
Anthony
Telerik team
 answered on 10 May 2012
3 answers
116 views

 I have an issue where a parent test is extracting a value from its dataset and which is used in the first iteration through the subtest, but when it comes back to reuse it an error re the extracted variable not being in the store occurs.

 

What I've got is: 

 

0 – Login - extracts value A from login dataset

                1 – Do scenarios - for each record in "scenario" dataset and create NEW dataset based on information extracted from "scenario" dataset AND "extracted value A"

                                2 – run tests based on created dataset  

 

Now as each test/subtest has its own dataset, it can’t inherit from its parent BUT the first run through test #1 it uses "extracted value A" with no problem.  When it attempts to run through it again the "extracted value A" appears to have been lost as it throws an error when I'm recreating the dataset.

 

Each subtest is set as a test fragment, and they both reuse the app window.  Only the initial "0 - Login" test is set to use a new window - but that it isn't getting that far.

Hopefully I haven't confused you.

Any ideas?

Thanks

Cheryl

Byron
Telerik team
 answered on 10 May 2012
2 answers
147 views
Hello,

From time to time I get strange tests failture reports on wait for ajax.
I'm using a code from this forum:
[CodedStep("Wait for AJAX")]
        public void AjaxWait()
        {
            Wait.For<int>(c => ActiveAjaxConnections() == 0, 0, 120000);
        }
  
        public int ActiveAjaxConnections()
        {
            return Actions.InvokeScript<int>("jQuery.active");
        }

It works great but from time to time exception is thrown and I get false alerts on application status:
Here is stack trace for the exception:
System.ApplicationException: Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.InvalidOperationException: Javascript call [JSON.stringify(eval(\"jQuery.active\"));] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'jQuery' is 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:'InvokeJsFunctionReturnJSON',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'jQuery.active',ClientId:'Client_e44e8a42-9bf5-4df0-940f-bae9ef9c4df0',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.InvalidOperationException: Javascript call [JSON.stringify(eval(\"jQuery.active\"));] failed! Please make the function exists and the call is using the correct prototype signature. Javascript error: TypeError: 'jQuery' is 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[T](String script)
   at ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions.InvokeScript[T](String script)

Any idea how to prevent it?

I could use try / catch block but I don't like this solution because I would'n get info when something really wrong happens to my application.

I'm using Telerik Test Studio version 2011.2.928.0

Bartosz
Bartosz
Top achievements
Rank 1
 answered on 10 May 2012
2 answers
134 views
Is it possible to export a manual test in excel?
Konstantin Petkov
Telerik team
 answered on 10 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?