Telerik Forums
Testing Framework Forum
11 answers
371 views
I have what seems like a simple situation that I need to test, and I'm having trouble getting the Telerik tools to do what I need.  I may be missing something entirely (and I hope I am), can someone shed some light please?

My test needs to:
navigate to the site
log in
search for a user
process some details for the user
log off
log in as someone else
search for the same user
verify that the results of the processing are displayed
log off

This needs to repeat 4 times, for 4 slightly different outcomes, with identical test steps.  The only difference is the customer detail that I am searching for.  I have the tests recorded as above, as seperate tests, each being run as a "test as step" from a main test (this is just one of potentially thousands of use cases, hence the need for re-usable test chunks).  If I data-bind the search step, then it just searches 4 times in a row, and moves on with the 4th user selected.  If I data-bind the main test, there doesn't seem to be any way to pass that data in to the child test.  Someone at Telerik has suggested that this is possible with coded steps, but I cannot find any documentation on coded steps, and so I don't quite know what functionality I have available.  I have played with this a little, but the data properties appear to be read-only, with no methods to alter them.  Can anyone suggest how I can get dynamic data to a test each time I call it?

I have even tried creating an instance of the test class in code, and setting custom properties on it directly, but this has hit a brick wall as it seems that the test class has no direct "Execute" method (just one that takes a path and runs from file, not from the instantiated object).  If I've overlooked something here, this would probably be the preferred solution.

Thanks,
Richard Hensman
Elena
Telerik team
 answered on 09 Nov 2016
6 answers
358 views
Hi I have attached a screen snapshot of windows authentication popup. I wanted to automated that, the reason is when ever I try to open the application it pops me for authentication.

The telerik automatically suppresses the window and navigates to the error page so I am not able to proceed with testing my application.. 

Is there any way I can automate the authentication window..
Boyan Boev
Telerik team
 answered on 04 Nov 2016
10 answers
235 views
Hi,
I am using MBunit tests for UI automation. My test involves clicking on OK button on a confirm dialog. The test work fine when executed individually. But if i run multiple tests in a class where few other tests are executed before the test involving confirm dialog, the dialog is not handled:

I have tried following option:

1. confirmDialog = new ConfirmDialog(ActiveBrowser, DialogButton.OK);  

      Manager.DialogMonitor.AddDialog(confirmDialog);

2. Manager.DialogMonitor.AddDialog(AlertDialog.CreateAlertDialog(ActiveBrowser, DialogButton.OK));
    Manager.DialogMonitor.Start();

3. Manager.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Enter);


But none is working in batch, however they all are working fine if test is executed alone. Please guide if there is any other was to handle dialogs.

Thanks,
Rohit
dan
Top achievements
Rank 1
 answered on 01 Nov 2016
1 answer
171 views

HI,

I am using just Telerik Test Framework. And trying to click button, but it doesn't responds.

What to do? Please, help.

P.S. 

I use Viisual Studio 2013 Community Edition, NUnit v.2.6.4

P.P.S.

Attaching project for this. Run TestApplication ones.

Nikolay Petrov
Telerik team
 answered on 26 Oct 2016
1 answer
245 views

We are using the Testing Framework (version 2016_3_0928_5) against a site that is forced to use IE 11 in Enterprise Compatibility Mode and we often see the following exception while executing the tests:

System.InvalidOperationException: Javascript call [var eventObjJSON = 'null';var eventObj = JSON.parse(eventObjJSON);var eventType = "HTMLEvents";var eventName = "change";var evt = document.createEvent(eventType);if (!evt) throw "Error creating event";var altKey = false;var ctrlKey = false;var shiftKey = false;var metaKey = false;if (eventType == "HTMLEvents" || !eventObj) {evt.initEvent(eventName, true, true);}else {if (eventObj.modifiers & 0x01)altKey = true;if (eventObj.modifiers & 0x02)ctrlKey = true;if (eventObj.modifiers & 0x04)shiftKey = true;if (eventObj.modifiers & 0x08)metaKey = true;if (eventType == "MouseEvents") {var button = 0;if (eventObj.button & 1)button = 0;else if (eventObj.button & 2)button = 2;else if (eventObj.button & 4)button = 1;var relatedTarget;if (eventObj.relatedTarget)relatedTarget = eval(eventObj.relatedTarget);evt.initMouseEvent(eventName, true, true, window, 0, eventObj.screenX, eventObj.screenY,0, 0, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget);}else if (eventType == "KeyboardEvent") {var keyCode;var charCode;keyCode = eventObj.keyCode;if (eventName == "keypress") {charCode = eventObj.keyCode;}else {charCode = 0;}var keyNum = String.fromCharCode(parseInt(keyCode)).toUpperCase().charCodeAt(0);var keyIdentifier = "U+00" + keyNum.toString(16);evt.initKeyboardEvent(true, true, window,keyIdentifier,0, ctrlKey, altKey, shiftKey, metaKey);}}var target = document.getElementsByTagName('select')[1];target.dispatchEvent(evt);] failed! Please make sure the function exists and the call is using the correct prototype signature. Javascript error: TypeError: Object doesn't support property or method 'createEvent' 

Has anybody encountered a similar error and found a resolution?

Any help would be greatly appreciated.

Thank you,

Greg

Elena
Telerik team
 answered on 25 Oct 2016
3 answers
144 views
Query 1:
From the IDE I have set the default browser to be IE for the testlist. Then through a bat file I execute the test list. It opens a blank IE screen and then nothing happens. The same test runs successfully using Chrome. So Wanted to know what is missing in case of IE browser when trying to execute using ArtofTest.Runner. Following is the snapshot of the bat file I use.

 

Query 2:

I have multiple test lists (segregated based on the functionality of the software.) How can I execute all the testlists under the TestList folder using ArtofTestRunner?

IF EXIST "C:\Program Files (x86)\Telerik\Test Studio\Bin" goto :a
echo not found
pause
exit
:a
setlocal
path=C:\Program Files (x86)\Telerik\Test Studio\Bin;%path%
call ArtOfTest.Runner.exe list="C:\TFS\TestWare\Branches\10.1\Automated testing\Level7FO\TestLists\%%I"

 

 

Elena
Telerik team
 answered on 24 Oct 2016
1 answer
285 views

Dear Telerik Support Team,

I´m using the latest version (released on 28th of September) of Telerik Test Framework - I did not isntall Telerik Test Studio, only the Framwork.

My windows has a build number of 14 393, so I downloaded the correct Microsoft WebDriver exe from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ page. The newest WebDriver gives me a single exe file instead of a full installer. Unfortunately I cannot run my tests on Edge browser, because I always get the following exception: "Microsoft WebDriver is not installed!"

How can I make this working? Even if I copy the newest WebDriver.exe file to my C:\Program Files (x86)\Microsoft Web Driver folder - this is the install path of my old webdriver - , Edge tests are not running at all.

Thanks in advance!

Boyan Boev
Telerik team
 answered on 14 Oct 2016
9 answers
684 views
My site has a lot of long-form content, so most pages have a scrollbar. Trying to use the Capture method on the browser to get a screenshot works, but only for the visible frame. Is there a way to capture the entire contents of the page to a screenshot?

I was thinking about doing scrolls, but I can't seem to find a scroll / page height that I can use to calculate how far and how many times I need to scroll so I can stitch together an image. Is it possible to get such information?

Thanks,
Nick
Boyan Boev
Telerik team
 answered on 05 Oct 2016
1 answer
188 views
  1. When I run the recorded telerik test using MSTest, it opens the browser opens webapp and performs the test successfully.
  2. When I automate the test using bamboo, it opens the browser does nothing and gets timed out.
  3. Executing test: 'webtest', path: 'webtest.tstest.'
    - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2016.2.630.0'.
    Starting execution....
     Failure detected during execution. Details:
    ------------------------------------------------------------
     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.Manager.WaitForBrowserToConnect(Int32 browserIndexToWaitFor)
       at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InitializeWeb(ExecutionEngineCreateParams initParams)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.CreateAndInitializeEngine(Test test, ExecutionEngineCreateParams cp)
       at ArtOfTest.WebAii.Design.Execution.TestExecuteProxy.ExecuteTest(ExecuteTestCommand command)
    ------------------------------------------------------------Test completed!
Nikolay Petrov
Telerik team
 answered on 03 Oct 2016
3 answers
157 views

Hi,

I need a While loop that will execute its loop until an element's text content equals 'Active Accounts'. Like so...

 

while(Verify 'TextContext' 'NotEquals' 'Active Accounts' on QuerySelector)

      click selector

 

 

Note, using 'Not Contains' in the condition won't work because a possible text content value is 'My Active Accounts', which I must be able to differentiate from 'Active Accounts'.

 

I tried the Regex negative look ahead expression   /^(?!.*Active Accounts)/g, but that didn't work.

 

So, how can I implement an effective 'NotEquals' in a while loop?

 

Thanks,

dan

 

    
Nikolay Petrov
Telerik team
 answered on 30 Sep 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?