Telerik Forums
Test Studio Forum
2 answers
86 views
I've gone through the steps of extracting text and assigning it to a variable as shown here: http://www.screencast.com/users/TelerikTesting/folders/Jing/media/c85d61a1-9724-41d4-abc2-03975b07bf23

Now, I want to use that as part of a URL. Is it possible to concatenate text?

Use Case: I use a content system to publish to a site. I want to confirm the content made it to the front end.

I would like to navigate to a url like: http://www.site.com/?contentId=$(extractedValue)
Somuch
Top achievements
Rank 1
 answered on 07 Nov 2012
3 answers
341 views
The suggested approach to creating global variable is rather cumbersome and also forces every reference to a global variable to require customize in code.

The approach below uses the SetExtractedValue and GetExtractedValue instead

All references to the variables can be through DataDriven bindings.

  1. Create an XML file

<GlobalValues>
    <GlobalValue>
        <TelerikHomeFirstname>"Michael"</TelerikHomeFirstname>
        <TelerikOwnerSurname>"Jackson"</TelerikOwnerSurname>
        <TelerikHomeEmailAddress>"Neverland Ranch"</TelerikHomeEmailAddress>
        <TelerikNickName>"King of POP"</TelerikNickName>
        <TelerikURL>"http://google.com/"</TelerikURL>
        <TelerikDBUsername>"telerik"</TelerikDBUsername>
        <TelerikDBPassword>"TelerikPassword"</TelerikDBPassword>
        <TelerikDBDatabase>"telerikdb"</TelerikDBDatabase>
        <TelerikCheckCountUsername>"tlk"</TelerikCheckCountUsername>
        <TelerikCheckCountPassword>"password"<TelerikCheckCountPassword>
    </GlobalValue>
</GlobalValues>   

Add a new Script Step. In the OnBeforeTestStarted method
add the following code

public override void OnBeforeTestStarted()
{
    string globalVarsFile = @"c:\<path>\myglobalvarsfile.xml";
    
    try
    {                    
        if(!File.Exists(globalVarsFile))
        {
            // an error has occurred
            Log.WriteLine("Error: FILE" + globalVarsFile + "DOES NOT EXIST");                    
            Assert.IsTrue(false);
        }
        else
        {
            Log.WriteLine("File found" +globalVarsFile);
        }
                            
        XDocument globalVarsXML = XDocument.Load(globalVarsFile);

        var queryResult =
            from gl in globalVarsXML.Element("GlobalValues").Element("GlobalValue").Elements()
            select gl;
        
        foreach(XElement x in queryResult)
        {
            SetExtractedValue(x.Name.ToString(), x.Value.ToString());                     
        }   
    }
    catch(FileNotFoundException fnfe)
    {
        Log.WriteLine("IO Error occurred: " + fnfe.Message);
        
    }
    catch(IOException ioex)
    {
        Log.WriteLine("IO Error occurred: " + ioex.Message);
    }
}




Cody
Telerik team
 answered on 07 Nov 2012
3 answers
98 views
Hello,
I am attempting to open one of the sample projects in VS2010 Express but I am getting the following error:

"C:\Program Files (x86)\Telerik\Test Studio\Samples\Testing Framework\QuickStarts_VSTS_VB\QuickStarts_VSTS_VB.vbproj : error  : The project file 'C:\Program Files (x86)\Telerik\Test Studio\Samples\Testing Framework\QuickStarts_VSTS_VB\QuickStarts_VSTS_VB.vbproj' cannot be opened.

The project type is not supported by this installation."

Any ideas? Thanks for your time.
Plamen
Telerik team
 answered on 07 Nov 2012
3 answers
152 views
Hello,

I have created my first test today! In my app I save a draft Requisition. After saving it I'm presented it's new ID in two pays.

In the url: https://sub.domain.org/Requisition/RequisitionView/2813

And also on the page I have this html element:
<span class="requisitionTitleText">Requisition # 2813:<span class="requisitionDetails"> tt 574 6</span></span>

In the both cases I need to do some "trimming" as it has extra text, for example:
string newReq = "Requisition # 2813:"
newReq = newReq.Replace("Requisition # ","");
newReq = newReq.Replace(":","");

So.. I need to have this ID, in either a text file or in memory, because I have 10+ other tests that will rely on this.

I'm assuming that I need to:
  1. save the id to a local datasource
    How do I do this?
  2. in later tests, reference it like in this article
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/data-driven-testing/local-data-driven-test.aspx


Thanks!
Byron
Telerik team
 answered on 06 Nov 2012
2 answers
93 views
All of a sudden my playback speed has dropped considerably. I have not made any changes to my scripts today but yet when I run them there are now seconds between each step when they used to run back to back without pause. Can anyone give me cause to this?
Ivaylo
Telerik team
 answered on 06 Nov 2012
5 answers
84 views
Hi,

I have recurring scheduled run in execution server. I could see waiting test runs (in yellow) in my local machine, but now they are disappeared. In case of updating them, i could just click on them and make my update. Now I cannot see those waiting one, therefore cannot update them. I tried reload from server but it did not reload all of them. 

Do you have any idea why i cannot see waiting runs and how i can update those if i cannot see them?

Thanks

Ercan
Ivaylo
Telerik team
 answered on 06 Nov 2012
3 answers
120 views
Using Telerik Test Studio standalone version 2012.1.7190.
I am running a Test list against all the major browsers. However, the tests are failing because of Chrome Version 22.0.1229.94 m

The actual problem is occurring when the test reaches a specific step, clicks on a link which creates a new tab instead of a pop-up window

This is an example of the link

HtmlAnchor:<a href="http://www.google.co.uk" target="_blank">

The code cannot be changed and because "_blank" is not guaranteed to be a new tab or window. It's implemented differently per-browser. I have implemented the workaround below;


My work around
            if(ActiveBrowser.BrowserType == BrowserType.Chrome)
            {
                ActiveBrowser.Manager.LaunchNewBrowser(BrowserType.Chrome,false);
                Log.WriteLine("URL of link: " + Pages.PropertyServicesSearch1.LCInventoryLink.HRef);   
                ActiveBrowser.NavigateTo(Pages.PropertyServicesSearch1.LCInventoryLink.HRef);
                ActiveBrowser.WaitForUrl(Pages.PropertyServicesSearch1.LCInventoryLink.HRef,false,30000);  
            }

Unfortunately, the newly launched browser gets stuck at for 30 seconds (30000) at  Preparing browser for automation...

Is there a better way?
Ivaylo
Telerik team
 answered on 05 Nov 2012
9 answers
183 views

Hi,

The scenario I am trying to automate is:

  1. Click on menu. It opens up a pop-up menu having different options listed along with the checkbox for each option.
  2. Select the checkbox for an option.
  3. Selection of check box adds one more option to the same menu called as ‘Apply’. Click the ‘Apply’ option.

Now I am trying to record this scenario using Telerik Test studio. When I am executing the recorded steps, I could successfully select the checkbox from pop-up menu. But after that ‘Apply’ option is not getting added to the same pop-up menu.

Could someone please advise me on how can I deal with the above scenario?

Plamen
Telerik team
 answered on 05 Nov 2012
1 answer
127 views
I want to create coded steps to handle Silverlight elements.
I created following code
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
But my code can't connect to Silverlight application.
As I understand this is because I have Silverlight application wrapped into iframe.
<DIV style="DISPLAY: none" id=IFRAME_MainDetails_c class="ms-crm-FieldLabel-LeftAlign ms-crm-Field-Normal" sl="false"><LABEL for=IFRAME_MainDetails>MainDetails</LABEL></DIV>
<IFRAME style="BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-TOP: 0px; BORDER-RIGHT: 0px" id=IFRAME_MainDetails class=ms-crm-Custom tabIndex=1020 src="/TempTestHandover/%7B634871220200000000%7D/WebResources/sitecore_/KpiReports/QualificationRecordMainDetails.html" frameBorder=0 scrolling=no preload="0" url="../webresources/sitecore_ClearBackgroundPage.htm"></IFRAME>

Please provide example of code how could I define IFrame element and then define inner Silverlight application in it.
Cody
Telerik team
 answered on 02 Nov 2012
9 answers
236 views
I am using TelErik Load Test Tool and created a Load Test. It is a simple MVC form with 5 fields. The load test generated a lot of failures.
When i browse the url thru the browser , i get the following message:

Server Error in '/DemoTestAppName' Application.
Sequence contains no elements
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Is there something i need to look at the application level?

Thanks

Ivaylo
Telerik team
 answered on 31 Oct 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?