Telerik Forums
Test Studio Forum
1 answer
334 views

I am trying to open our web site which is located abroad so there is a considerable delay between request and response. Sometimes it takes up to 10-15 seconds to load the page and while waiting for it Test studio is throwing the following error (but after all it loads the page though):

 

'30/04/2021 14:46:42' - 'Fail' : 6. Navigate to : eHarmony by NavigateURL variable
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Navigate to : eHarmony by NavigateURL variable'.
InnerException:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.InternalNavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(Uri uri, Boolean useDecodedUrl)
   at ArtOfTest.WebAii.Core.Browser.NavigateTo(String url, Boolean useDecodedUrl)
   at UpdateIdkynScreenFull.YN_GeneralManagerLoginProduction.YN_General_Manager_Login__CodedStep2() in c:\Automate\ATP%20Sources\eHarmonySecurity11\Logins\YN- General Manager Login .tstest.cs:line 111
------------------------------------------------------------

 

Has someone faced this issue and how could you handle this, please? I know that I can put "continue on failure"=true, but then the overall result of the test will be shown as failed

Plamen Mitrev
Telerik team
 answered on 03 May 2021
1 answer
562 views

Hi Team,

I am getting error while executing Rest API for authentication. This works fine on fiddler but does not work on Telerik Test studio API. Please help! 

I have attached a code and screenshot. 

Error: 

'The request was aborted: The request was canceled.'

Thank you so much in advance.

Elena
Telerik team
 answered on 22 Apr 2021
1 answer
176 views

Hi,

I am new to Telerik Test Studio.

I am trying to figure out how to find a label if it's pseudo element ::before or ::after contains specific CSS class (.custom-control-input:checked).

Please see the screenshot attached.

If I locate required element as below:

var label = div.Find.ByAttributes<HtmlControl>("class=~custom-control-label");

I can't find the way to examine its pseudo elements. There is no trace of .custom-control-input:checked

Please advise

Elena
Telerik team
 answered on 21 Apr 2021
5 answers
3.8K+ views

Hello,

Recently I get this error when filling in something in a textbox in chrome. Does anybody have a glue why and how to solve this.

ExecuteCommand failed!
InError set by the client. Client Error:
Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src https: 'unsafe-inline'".

BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'document.getElementsByTagName('input')[0].focus()',ClientId:'e0aa945a-25fb-49b3-83a5-e4b7da4f60bb',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src https: 'unsafe-inline'".
')
InnerException: none.

Thanks
Bjorn

Elena
Telerik team
 answered on 15 Apr 2021
8 answers
148 views

Is it possible to make a custom coded testing step that iterates the current webpage DOM, finds all of the date fields and types in a date?

 

I am a C# coder but not that familiar with the object model of test studio so I could use a little starter code.

 

Thanks!

Plamen Mitrev
Telerik team
 answered on 15 Apr 2021
5 answers
317 views

Hi Guys,

I am getting this error when I run convert recorded steps to Code.

Please refer video.

 

Code :

  Actions.SetText(Pages.Time2Work.TbUsernameEmail, "AutoCycle");

 

Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Enter text 'AutoCycle' in 'TbUsernameEmail''.
InnerException:
System.ArgumentException: Invalid input type 'Text' for this control. Control was expecting 'Email'
   at ArtOfTest.WebAii.Controls.Control.CreateInstance[TControl](Element e, Boolean throwIfNull)
   at ArtOfTest.WebAii.ObjectModel.Element.As[TControl]()
   at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](HtmlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](String[] clauses)
   at WebTest.Pages.Time2WorkPage.get_TbUsernameEmail() in c:\Dev\OnTime\Scheduler\WebTests\System Regression\Pages.g.cs:line 364
   at WebTest.Login_Employee_User.Login_Employee_User_CodedStep3() in c:\Dev\OnTime\Scheduler\WebTests\System Regression\03_User Tests\Login Employee User.tstest.cs:line 148
Plamen Mitrev
Telerik team
 answered on 14 Apr 2021
1 answer
141 views

Hi,

I have a question related to running a specific test case in the test list to run on a specific browser.
Intro:
I have two test cases.
     A) Loads the Google.ca website.
     B) Loads the DuckDuckGo.com website.
-----------------------------------------------------------------------------------------------------------------------
Expectation.
I want to add both of them to the Test List and would like testcase A to be executed on Chrome and IE (both) but testcase B to be executed only on IE.
-----------------------------------------------------------------------------------------------------------------------
Current Configuration:
Under Projects:
Test Case A --> Properties "BrowserType" --> NotSet
Test Case B --> Properties "BrowserType" -->InternetExplorer
TestLists --> Properties, "Browser" --> NotSet; "ExecutingBrowsers" --> IE, and Chrome
-------------------------------------------------------------------------------------------------------------------
With my current Config, Test Studio does the following

Open IE --> Run testcase A and B,
then Open Chrome --> Run testcase A, Opens IE (Again) --> Runs testcase B

Thus, I am looking a way to tell Test Studio, that if the browser does not match then please ignore the testcase in the testlist.

Please let me know if this is achievable.

Thanks,
RG.

Elena
Telerik team
 answered on 08 Apr 2021
1 answer
268 views

Hello,

I try to associate a test created in Telerik Test Studio project to TFS test case but I get the error (on the picture)

Microsoft Visual Studio Professional 2019
Version 16.9.3

Test Studio version 2020.2.804.0

How can I fix the problem?

Elena
Telerik team
 answered on 08 Apr 2021
3 answers
192 views

Hi Guys,
I am really stuck with configuring execution server so I hope I will find a solution here.

Detailed explanation of Issue : 

I have some automated tests in Telerik Test Studio. This is What I want to achieve :  It should execute all Tests from [TestList] every Morning and send results on my email.For This,
1. I have created TestList.
2. Click on Schedule TestList in the Scheduling ribbon
 Step 1.Selected Date and Time for TestList Execution
 Step 2.Select Machine to execute the TestList.
 (Here is the Problem 1.0)It does not show anything to select. (screenshot)
  This link : https://docs.telerik.com/teststudio/automated-tests/scheduling/schedule-execution says to add an execution server.
  So I followed this link https://docs.telerik.com/teststudio/automated-tests/scheduling/multiple-machines-scheduling-setup/create-execution-server 
  Mongo Db, Telerik Storage Service and Telerik Scheduling Service is running as per screenshot.
  Now to configure execution server, I went to Windows Start Menu > Start Execution Server -> click the Test Studio icon in the Windows Task Bar and click Show. (Problem 1.1) Test Studio Test runner window is blank as per screenshot. Any idea?? 
  I am very far from achieving my goal. Need help! Thank you so much in advance!
 

Plamen Mitrev
Telerik team
 answered on 30 Mar 2021
25 answers
575 views

I am using Telerik Test Studio to record automated regression tests for our asp.net web app. We have to support IE11 still. When generating a report you click a continue button and wait several minutes at times for a dialog box to display. I am attaching an image of it. Even though it says Internet Explorer as the title I think it is a Windows Dialog. I need to wait for it to appear, Then click on the open button to cause it to disappear. I can a c# coder so writing a coded step is not an issue but all the samples I have seen so not address this kind of dialog. I have tried the following code but it seems to not find the dialog when it appears.

        [CodedStep(@"New Coded Step")]
        public void SPOT_Deploy_OVR_Rpt_CodedStep()
        {
            GenericDialog SecurityWarningDialog = new GenericDialog(ActiveBrowser, "Internet Explorer", "Open", true);  // Click on the Open button
            Manager.DialogMonitor.AddDialog(SecurityWarningDialog);  

            Manager.DialogMonitor.Start();  

            //Click the link that launches the security dialog
            //ClickLink();
            Manager.Desktop.KeyBoard.KeyPress(Keys.Enter);


            SecurityWarningDialog.WaitUntilHandled(240000);

            Manager.DialogMonitor.Stop();           
        }

 Pardon me for drawing a blue line over the image. It was an accident when I captured it.

Please help!!!!

Plamen Mitrev
Telerik team
 answered on 25 Mar 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?