Telerik Forums
Test Studio Forum
3 answers
154 views

Hi , 

I have 2 functions or methods  in the test. In function1, I have a variable called x which stores the inner text of particular span in my webpage. Now I need the value of the variable to be used in my Function 2. I dont want to use the extract step . I want to find the element using find expression in function1 and use the value in function2 .

Eg : 

Public sub function1()

Span = Pages. xxxx.xxxx

Dim X as string = Span. innertext ()

End Sub

--------------------------------------------------------

Public Sub function2 ()

Messagebox.Show("Document id is :" &Docid)

End Sub

 

Could anyone help me to do this ? Thanks in Advance!!

 

Nikolay Petrov
Telerik team
 answered on 06 Oct 2017
10 answers
798 views
Hello,

I've been getting compiled error "...can't find Telerik namespace..." when create Script Test or generate Customize Step in Code since installed the licensed version of Test Studio.  This happens due to the existing of "Telerik.WebAii.Controls.Html;"
and "Telerik.WebAii.Controls.Xaml;"  I fix this by commented out those two references and all customized code works as it should.

Check intellisense in the editor (Test Studio), only object under Telerik namespace is TestStudio().

Do I need those reference for future project?  If yes how to fix it, if no how do I exclude those lines in  Test Script?

One more note, I uninstalled the trial version before install User version.

Thanks.
Thomas
Top achievements
Rank 1
 answered on 05 Oct 2017
3 answers
102 views

I'm using the Download dialog step to download an XLSX file from our webapp. I set the export path in code, and data drive the path. Timeout is set to 75000ms with a 1000ms initialization time.

- Works perfectly in IE, exactly how I would expect.

- Chrome is opening the dialog, and it is filling it in and downloading the file, however that's all it does. Once the file finishes downloaded, it just sits on the webpage until it times out.

Adding a delay between the clicking of the button and the handling of the dialog did nothing.

Elena
Telerik team
 answered on 05 Oct 2017
1 answer
118 views

Hi, 

I'm new to this app and have a problem how to connect a tablet. Device is regularly connected via usb as is required and I cannot connect it to Test Studio, and I can connect device via WiFi, but then I cannot use it as input device.

Please help.

Elena
Telerik team
 answered on 04 Oct 2017
4 answers
114 views

Hi , 

I have a web application built in html5. I am trying to type some input values in one of the input fields..Initially I recorded the Step.

=> The Recorded step is like "KendoInput Value 500 entered" - When I give "Edit in Code " the step is like..

=> Pages.xxx.Span.TypeText ("500") 

Now, I run the step. It goes and enters the Value as "00" - 5 is not present.

 

Then I tried to edit the code as  Pages.xxx.Span.TypeText ("00500")  and run the step. Now I got the value 500 entered.

 

I am not sure, why the first 2 value are getting erased out..

 

Could anyone help me to find out the issue behind it..Thank you!!

Regards, 

Nithya A.

Nithya
Top achievements
Rank 1
Veteran
 answered on 03 Oct 2017
1 answer
220 views

I have encountered several methods of storing variables that can be accessed across tests, and I am wondering what the recommended scenario is. My goal is to be able to run a master test with several sub-tests (and some with sub-tests themselves), but to have each primary sub-test store variables based on input, and then to react to those variables by skipping unnecessary tests or adding/subtracting/modifying values to fit certain constraints. Basically, I need to set and get variables across multiple tests in a longer process.

Here is what I know currently, but correct me if I'm wrong:

1. Extracted Values

Using SetExtractedValue(string dataBindVariableName, object value) I can create variables that are accessible across tests. This allows me to access the values via GetExtractedValue(string dataBindVariableName). The challenge is that these get/set methods automatically fail the test whenever the variable is not present (e.g., I used a "get" in a scenario where the variable has not been "set"), so I have to nest all of them in Try/Catch blocks. If I want to conditionally check to see if these values exist, I have to put each one in its own Try/Catch block so I can respond to each variable independently. While possible and functional, this gets tedious and very cluttered in code, so I have looked at 2 other options:

2. DataBound Variables

Using Data["variableName"] I know I can access the values stored in local or external data sources, based on the column name. My confusion is how this interacts with extracted values, as sometimes I seem to be able to switch back and forth between Data[""] and GetExtractedValue(""), but sometimes I can't. Also, the same rigid constraints exist on data bindings as with extracted values, meaning that I have toput them in try/catch blocks if I want to conditionally test for whether the variable is present yet or not.

3. Utility Classes

This might be the easiest option, and the limitation might be my programming knowledge here. I found documentation talking about creating a utility class in Test Studio standalone. It's a static class with static variables, which works great for some of the stock browser interactions I want to do in dozens of places throughout my test suite. The challenge is that I have to add in references to the Browser (for ActiveBrowser.Refresh/ActiveBrowser.RefreshDomTree), the Log (for Log.WriteLine), and the Manager (for Manager.Desktop). However, since a static class is not instantiated, my only option is to pass in all of these values every time I run a function. Not the end of the world, I suppose. I am currently using a standalone non-static class file (extending BaseWebAiiTest) to work around this, but I don't know of an easy way to pass this between tests and sub-tests. Is there one?

 

I imagine you will want code samples, and I can provide them, but I'm mostly looking for a general principle. My question is about the expected way these features function in general, and which one fits my need to pass variables and functions between tests.

 

Thanks ahead of time!

 

Regards,

Steven Klassen

Elena
Telerik team
 answered on 02 Oct 2017
4 answers
197 views

I am a new user to "Test Studio". I need some help with the following: 

#1) How to setup a Batch Testing in Test Studio so that I can setup multiple scripts to run in a sequential order? 

#2) How to setup a schedule to run multiple scripts automatically over night without manual intervention?

#3) How to setup a folder where all the test results (Pass/ Fail) will be available after the over night test run?

Please send me the details steps. Thanks so much.

 

 

Elena
Telerik team
 answered on 29 Sep 2017
5 answers
119 views

(I am just starting to play around with remote test execution and there isn't a lot of clear documentation, so I may simply be missing the basics.)

I have a VM configured as a Remote Execution Server and it is successfully running basic tests when initiated from within Test Studio and the Scheduling Server. In the last couple of weeks I have been redoing some tests to make them simpler and more flexible when handling errors, and in doing so I have copied some Coded Steps from other existing tests. This has ended up in a scenario where many of my tests will not run on the Remote Execution Server because they cannot find the elements I have added to the Element Library. To clarify, the elements exist in my library on other tests, but it seems that because they are not local to this specific test, the elements cannot be found. NOTE: The whole project runs great locally on Test Studio; it is only the remote run that fails to find the elements.

If I record on that test and click on the respective elements, creating steps that I don't need, then the test seems to run remotely without error. However, I will have to do this for hundreds of elements and it will be quite time-consuming. Is there a way to mass transfer project files / elements to the remote execution server so it knows what they are?

Similarly, I also noticed that when I duplicate a test to modify it and create a different scenario, it only brings over the elements that are created in Test Studio steps. Anything referenced in a coded step (i.e., Actions.SetText(Pages.WebsiteName.ElementName, text)) does not bring over the element, so if I later want to create a Test Studio step using this element, I have to re-record it in order to recognize it in the local test. Trying to select the item from "Elements" and use the "Step Builder" doesn't help, as it only shows the "Getting Started with the Step Builder" text when I go to Actions or Verifications. If I record that element once in the local test, then Actions and Verifications will display their options. Is there a way to bring elements into new tests without having to re-record them or manually copy Test Studio steps that include the elements?

(I hope I'm using the right terminology...)

Thanks ahead of time!

 

Regards,

Steven Klassen

Nikolay Petrov
Telerik team
 answered on 28 Sep 2017
5 answers
128 views

Hello,

The error happens in the following scenario.

First I have a test I will call him Test A he is 343 steps. At his 50 step I call other test (Test A') with Test as Step which is 1300 steps

The purpose of the test is to register a large form of data with 10 companies and some other data. The registration of these 10 companies is in Test A'.
After I save the form, a unique record number is generated that needs to be used later in the other tests. Also I take with extraction steps, all the infromation for this 10 companys and other data which is saved in the form. I use these extraction steps later in the other tests to verify the data.

 

Test B - This test calls as first step Test A. Test B have 696 steps inside him. Its purpose is to edit the saved form that was made by Test A and to add more data to the form and save it again .

Test C - This test calls as first step Test B. The purpose of this test is to verify the data after the editing is done by Test B and to generate a document in the form with unique number.The test have 548 steps.

Test D - This test calls as first step Test C. The purpose of this test is generate 3 documents in the form with unique numbers and status. For the last three steps of the test I call three more tests (Test D', Test D'', Test D'').
After the first 3 documents are generated, three new buttons are activated and with them I have to generate other 3 documents. Test D have 186 steps.
Test D' have 451 steps, Test D'' have 511 and Test D''' have 486 steps.

When I start Test D, the tests A, B, C, D, D', D'' are executed successfully but when runs the last test (Test D''') gives me the error System.OutOfMemoryExeption.

Тhe total number of steps for all tests is 4518 steps.

 

My question is is there any limitation on how many steps I can perform when using Test as Step feature? Аnd whether in the new version will give me the same error?
Is it possible to give me this error because it's expected to generate a large result?

 

My Computer parametes:

OS:Windows 10
RAM: 16GB
System type: 64-bit

Using Telerik Test Studio Version 2014.3.903.0 - 32 bit.

 

I also read this artical.

Option 1 is to break the test to have steps less then 800 steps. I did that with the tests, only Test A' has 1300 steps, this is the minimum I can leave.
Option 2 I use 64-bit operating system
Option 3: Оnly this option I have't tried. And I'm not sure if this option will help me?

I attach files with the error and the memory used before test to trow this exception.

Thank you in advance for the answer.

Regards,

Boris

Elena
Telerik team
 answered on 28 Sep 2017
5 answers
209 views
Hi ! I have an issue in my Web Test (For Silverlight powered site). 

After a particular step, there is a Dialog box popping up and hence the whole test fails. Big problem is the occurrence of Dialog box is not constant. So can I create an If-Else loop likewise to handle this.

So if I place the If-Else loop after the particular step, If the dialog box comes, It has to click ok and Continue, or else it has to proceed as usual. Can anyone help me in regard of this...? Thank you...

I hope I made my problem clear. If not, Let me know. I can explain More...

P.S: I know exactly after which step the dialog may popup. 
Nikolay Petrov
Telerik team
 answered on 27 Sep 2017
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?