Telerik Forums
Test Studio Forum
3 answers
132 views
Hi,

Is it possible to capture the value returned from executing a SQL statement executed through the Code Behind window?
I have a script that works fine, and the VB in the code behind window also works fine.  However, I want to expand the VB script if possible, so that I can execute the following algorithm:

Open connection to database
Execute SQL statement to check if value exists in a database table
If the value exists then
    Do this
Otherwise
    Do this
End If
Close connection to database

What I need to understand is how to get a result back from an execution statement such as:
   
     thisCommand.CommandText = "SELECT myValue FROM DatabaseTable"
     thisCommand.ExecuteNonQuery()

Is this possible?  Is there a better way?  If so, what do I need to do to make it happen?

When I run the following code, the value returned to my variable aResult is always -1, regardless of whether the search succeeds or not:

SQL_Command = "SELECT * FROM LookupItemsTexts WHERE [Text] = 'fred'"
Log.WriteLine(SQL_Command)  'debug line
'Now execute the command
thisConnection.Close()    
thisConnection.Open()
thisCommand.CommandText = SQL_Command
aResult = thisCommand.ExecuteNonQuery()
Log.WriteLine(aResult.ToString())  'debug line

Thanks,
Nigel Edwards.

Nigel
Top achievements
Rank 2
 answered on 21 Jun 2012
1 answer
98 views
Hi,

How can I get Excel Report of the test results through Coded step?

Thanks

Anuj
Anthony
Telerik team
 answered on 20 Jun 2012
1 answer
159 views

My test seems to fail on the Connect to pop up step

The pop-up loads just fine, however I think the test studio just can't connect to it.

here is the code for the step

// Connect to pop-up window : '<MYURLISHERE>.aspx?oid=54807'
Manager.WaitForNewBrowserConnect("<MYURLISHERE>.aspx?oid=" + (string)GetExtractedValue("OrderNumber"), true, 5000);
Manager.ActiveBrowser.WaitUntilReady();

Take note even without replacing the oid the connect to popup fails, but still loads page,

MYURLISHERE is actually a URL in the code in TS.
Stoich
Telerik team
 answered on 20 Jun 2012
2 answers
75 views

I am evaluating Test Studio as a potential candidate for running automated testing on a Silverlight application.  I watched the video “Test Studio – Guide to Success Part I.”  This video was very helpful.  However, I am having trouble automating a test for a Silverlight Out of Browser application. 

First, I configured Test Studio to open the OOB application.  When I click the record button, I get an unhandled exception. 

In addition, I cannot watch the video “Out of Browser Silverlight Applications.”  Right now this video would be very helpful.  Likewise, none of the Silverlight Automation videos seem to work.  Please help.

Top Gun
Top achievements
Rank 1
 answered on 20 Jun 2012
1 answer
98 views
After saving an order in my web application a pop up box comes up with text and the order number.

I need a way to parse the text so the variable saved from the extraction is only the order number.

(I have visual studio also so if i need to do it there I can).
Anthony
Telerik team
 answered on 18 Jun 2012
1 answer
65 views
Hi,

How to Design Test Automation Framework to automate Silverlight based Product using Telerik Test Studio and C# ?

Thanks
Anthony
Telerik team
 answered on 18 Jun 2012
5 answers
152 views
Hi,

How can i automate/capture the RadBusyIndicator? I want to populate the textbox correctly so I set next action to Wait.ForNoMotion but it doesn't works.

Also, is it possible to extract the URL the page being tested and add a web/wcf service to the Test Project?

Thanks
Anthony
Telerik team
 answered on 18 Jun 2012
3 answers
103 views

Hi, 

The new version of Telerik Load Testing, does it have data driven test capability?

If yes, where can I read more about it?

Thanks


Ivaylo
Telerik team
 answered on 15 Jun 2012
1 answer
141 views

Hi, please can you tell me what is purpose of associating coded test to Test Case in VS which I saw in your video (Test Studio Integration with Team Foundation Server)? I thought that this is when you need run more advanced test CUI test in MTM? But which advantage I can get associating Test studio test with test case?

 

Thanks

 

David

Cody
Telerik team
 answered on 14 Jun 2012
2 answers
89 views
Hello all,


I'm new to using Test Studio for automation testing, so I apologize if this ends up being a basic question.

I have a Silverlight pop-up window that I'm trying to automate and I've able to use Test Studio to record all of the steps. However, when I run the test it fails to click on a check-box like it's supposed to. That step is simply "Click 'ObjectTag'" and the code behind simply looks like this:

/// <summary>
            /// Find logic
            /// (Html): [id 'Exact' silverlightControlHost][tagIndex 'Exact' object:0]
            ///
            /// </summary>
            public ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl ObjectTag
            {
                get
                {
                    return Get<ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl>("id=silverlightControlHost", "|", "tagIndex=object:0");
                }
            }


I attempted to write some code to select the check-box, but because of it being a Silverlight page I've been unable to do so.

I also have a very hard time with Test Studio and the Silverlight pop-up window. I haven't been able to get the hover feature to work in the Silverlight window the way that it does on a normal page, so I can't get it to single out the checkbox at all. I'm guessing that is why I'm just getting the "Click 'ObjectTag'" for that step.

Any recommendations? I'm using Visual Studio 2010 and Internet Explorer 8.
Anthony
Telerik team
 answered on 14 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?