or
In this document we have tried to create an alternative documentation to the official documentation offered by Telerik on the Telerik Test Studio website.
This documentation highlights some features not mentioned in the official documentation like slowing down your test, taking screenshots, and others; it also contains a simplified explanation of some features explained in the official documentation. And also it contains some example on using the tool.
I hope you like it
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
" (as shown in : "http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/write-tests-in-code/silverlight-test-automation/introduction.aspx") I keep getting a timeout exeption even with very very high timeouts set ("Manager.Settings.Web.SilverlightConnectTimeout= (5000000);") SqlConnection thisConnection =
new
SqlConnection(
"Data Source=.\\sqlexpress; Initial Catalog=myFirstDB; Integrated Security=true;"
);
//We define a new SQL connection with a connection string.
//The connection string will be different depending on your usecase and the name of the Database, table etc.
//If you don't know how to write a connection string please look for tutorials on the Internet
thisConnection.Open();
Log.WriteLine(thisConnection.Database);
//Wrie the name of the database to the Log
SqlCommand thisCommand = thisConnection.CreateCommand();
//Create an SQL command
thisCommand.CommandText =
"SELECT test FROM MyFirstTable"
;
//This is a simple SQL command that will go through all the values in the "test" column from table "MyFirstTable"
//The SQL command will vary depending on your usecase.
//If you don't know how to write SQL commands please look for tutorials on the Internet
SqlDataReader thisReader = thisCommand.ExecuteReader();
//Create SQL reader
while
(thisReader.Read()) {
//Loop to go through the entire column
//Write each value to the log
//You can implement you own custom logic here
Log.WriteLine(
"Value of test column:"
+ thisReader(
"test"
));
}
thisReader.Close();
//Close Reader
thisConnection.Close();
//Close connection to SQL database
'thisReader' is a 'variable' but is used like a 'method'
Log.WriteLine(
"Value of test column:"
+ thisReader(
"test"
));