Telerik Forums
Test Studio Forum
5 answers
141 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
21 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
22 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
13 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
37 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
36 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
46 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
2 answers
36 views

Hello, 

I'm currently using Test Studio Version 2016.3.928.0 to test an ASP.NET Web Application. My test goes to my published application and a prompt is immediately prompted when the URL is hit to get the user's username and password. In Chrome, Edge, and Firefox the test runs fine when I do a navigation step and then deal with the dialog in the next step. In IE (version: 11.1770.14393.0), however, the test fails at the navigation step with the following information in the log: 

Overall Result: Fail
------------------------------------------------------------
'10/11/2017 6:43:31 PM' - Executing test: 'Internet Explorer', path: 'Internet Explorer.tstest.'
'10/11/2017 6:43:31 PM' - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2016.3.928.0'.
------------------------------------------------------------
------------------------------------------------------------
'10/11/2017 6:43:33 PM' - Using 'InternetExplorer' version '11.0' as default browser. 
'10/11/2017 6:43:34 PM' - LOG: Unexpected dialog encountered. Taking no action.
'10/11/2017 6:44:34 PM' - 'Fail' : 1. Navigate '/'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Wait for condition has timed out
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 ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.NavigateToActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'10/11/2017 6:44:34 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'10/11/2017 6:44:34 PM' - Overall Result: Fail
'10/11/2017 6:44:34 PM' - Duration: [1 min: 0 sec: 296 msec]
------------------------------------------------------------
'10/11/2017 6:44:57 PM' - Test completed!

 

I see that it detected the logon dialog, but it says it's timed out waiting for a condition. I'm not sure what condition it's expecting to since it did go to the proper URL. Nor am I sure how to find a workaround. In the other browsers I just set the BaseURL to my application URL and did the NavigationURL as '/' and the step didn't fail in the other browsers, but it still fails in IE.  I've recalibrated my browser and ran updates on Windows 10 and it hasn't had any impact on this error. 

Thanks, 

Jessica

CathyInCanada
Top achievements
Rank 2
 answered on 24 Mar 2021
6 answers
60 views
Are there plans to support the new headless mode in Chrome?
Elena
Telerik team
 answered on 12 Mar 2021
1 answer
53 views

Hi

We are using Telerik test framework for our application to perform Ui test. We would like to automate these tests in our CI Pipline. Currently we use Bamboo for this purpose but want to switch to GitLab. Therefore I wanted to ask if there is also a possibility to make the integartion with Gitlab and if there are possibly plugins available?

thanks in advance

 

Best regards

Marco

 

Plamen Mitrev
Telerik team
 answered on 25 Feb 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran
Top users last month
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Psyduck
Top achievements
Rank 4
Bronze
Bronze
Iron
Liu
Top achievements
Rank 1
Iron
Alex
Top achievements
Rank 1
Veteran
Iron
Iron
George C.
Top achievements
Rank 2
Iron
Veteran