Telerik Forums
Test Studio Forum
4 answers
202 views
Hi,

I am trying to extract a variable from the URL itself and set it as a string.  What I tried to do is the following.

sample code:

string URL = ActiveBrowser.Url.ToString();
string Variable= (URL).SubString(84, 2);

NativeWindow window = new NativeWindow();
window.AssignHandle(ActiveBrowser.Window.Handle);            
MessageBox.Show(URL);

I am getting a compilation failure, what is the correct way of setting the URL as a string, trimming it as needed and setting it as a variable(int). 
Dan
Top achievements
Rank 1
 answered on 30 Aug 2012
1 answer
135 views

I would like to have global variables which can be used across tests in current project.
In the project namespace, I creates a static class with the global vars (along with accessor methods).
But I was not able to use these vars, error seen while running tests stating: class does not contain definition for var.
I am not so familar with C#, but I tried other solution as well: created a struct inside the static class,
which includes the global vars. But in this case, I was not able to access the struct vars.
Value types for some reason cant be accessed the way we expected global vars to ber accessed.
I cant acess value types globally but for some reason I can acess reference types.

Any ideas or workaround on creating global vars - which can be set/get accross different classes/tests in Telerik?

Thanks,
Rakesh

Cody
Telerik team
 answered on 30 Aug 2012
1 answer
143 views
I'm getting two different 'Extracted Data Driven Bindings' from the recorder. At the end of the test I want to do an Assert.AreNotEqual() with the two dynamically extracted data values. How can I do this? When I try coding a step, the data bindings aren't available to the coded step.
Plamen
Telerik team
 answered on 28 Aug 2012
1 answer
169 views
Good morning,

at the moment I am evaluating Telerik test Studio for use in our company.
Now I came to a problem that is very essential for us:
    I want to create a data driven test case that validates the contents of a datagrid
    For Example:
        In the UI of the to be tested program there is a data grid with the following columns: Name, Surname, Login
        Now I want to verify that a certain set of expected values is present in this grid

So far I have found no way to check the entire grid. I only can verify a single cell. But it would be very inpractical to create a verification step for every single cell of the grid!
Now my question is:
    Is there a way to target cells in a data grid in a generic way, via a variable for example?

best regards

Hendrik
Ivaylo
Telerik team
 answered on 28 Aug 2012
1 answer
90 views
So something that I've always had a bit of an issue with is how to deal with dynamically changing containers, like tables, lists, etc.

As of now when I fill out a form, and that form adds content to a specific table, I use a code behind class and a customer HTML searching tool I wrote to search that table for strings that I am looking for. This is a bit troublesome, because it means that I'm required to create a code-behind class for every test that has to verify data.

Another option that I noticed is I can create a unique element that wont be the same so the search params will be something along the lines of:
tagname = td
InnerText = TheStringUniqueToTheTestIAmRunning

The problem with this is that this will eventually create hundreds, if not thousands of elements creating a massive project file, not to mention from my experience test studio standalone or the vs plugin don't handle sorting elements very well and often crash because of it.

So what I'm hoping for is some other options that are a little simpler, that can be unique to a test and not require a code behind... all suggestions are appreciated!!

Cheers
Jon
Cody
Telerik team
 answered on 27 Aug 2012
2 answers
364 views
Hi,

I'm having a problem with compilation error in a test script, but it ran fine if I opened that same script and run it.  

We're running stand-alone Test studio and we use store our automation tests in TFS.  There are 2 of us creating/editing automation tests, but we don't touch each other scripts.  Therefore, we only check in our own test scripts and use the "Get latest" option. 

After I did a get latest option, I tried to run my script "Message"; I got a compilation error on other scripts.  For example, "Search" script (please see the screen shot for the log error).  I went and run the "Search" script, it ran without any error.

The "Sort and Filter Cases" was created and it didn't work so the other Tester deleted all the steps in that script; so it's blank.  I opened the script and verified that there is no step in it. 

Could you help me figuring out why I am having these complilation problem?  Right now, I can't run my script due to this compilation error.

Thanks,
Mindy
Stoich
Telerik team
 answered on 27 Aug 2012
7 answers
123 views
Hello,

I converted a step to a coded step in my test file 'Policy_Coverage'.  When attempting to execute, I receive the errors below, all of which are in a different test file 'GL_Smoke_Driver'.  The execution worked fine before I converted to code, and when I remove the Policy_Coverage.cs file, execution is normal again.  I double checked the assemblies and they are all there.  What the heck happened?

j:\...\GL_Smoke_Driver.tstest.cs: Line 9: (CS0234) The type or namespace name 'Data' does not exist in the namespace 'System' (are you missing an assembly reference?)
j:\...\GL_Smoke_Driver.tstest.cs: Line 11: (CS0234) The type or namespace name 'Xml' does not exist in the namespace 'System' (are you missing an assembly reference?)
j:\...\GL_Smoke_Driver.tstest.cs: Line 78: (CS0246) The type or namespace name 'SqlConnection' could not be found (are you missing a using directive or an assembly reference?)

Many thanks,
Alan
Alan
Top achievements
Rank 2
 answered on 27 Aug 2012
1 answer
113 views
I'm having a problem that when I add an element it will create a new page.

My recording options are configured like so:
Example page: http://localhost/MyApp/somePage.aspx

base url: http://localhost/MyApp/
element page comapare mode: relative path only

The element will show as:
base url: http://localhost/MyApp 
path: /somePage.aspx
and the  ComapreMode varies between relativePathOnly, FullPath, and FullPathAndQuery

This is rather frustrating and difficult to manage, how is element management suppose to be done?

Thanks
Jon
Byron
Telerik team
 answered on 24 Aug 2012
1 answer
76 views
Hi team,
i met an issue when i tried to make my scripts to support firefox. when clicking some links or logo on the page, expected results is a new browser pop up with correct url, and we will close this new browser window then, but my scripts does not work well on firefox while it is ok on IE, my test studio version is 2012.1.719.0, and version 14 for firefox. i have attached a demo since my scripts in projects is a little large and complex, it will behave as the same issue.
Plamen
Telerik team
 answered on 24 Aug 2012
5 answers
224 views
Hello,
I recorded test and when i want playback it on Chrome and Firefox then i can't do that. On Firefox Telerik Framework is turned off because it's incompatible with it. How it's possible? I use trial version

In Chrome telerik plugin is working but after i click submit button, the page not reload. I see only "please wait". When i turn off telerik plugin then website open correct.

Ivaylo
Telerik team
 answered on 24 Aug 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?