Telerik Forums
Testing Framework Forum
1 answer
207 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
171 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
5 answers
149 views

This is the map for the application:screenshot.

 

I tried to locate one of the buttons using "visible" and "exists".

How can I locate this buton, it seems it is hidden too deep.

What should the approach be ? (It seems the developers build a wizard here which consists from four grids).

Elena
Telerik team
 answered on 29 Sep 2016
6 answers
162 views

Hi:

I am doing my first UI testing.  The rendered code can be found in the comments;

public string ValidationError
{
    get
    {
        // <div class="validation-summary-errors" data-valmsg-summary="true">
        //  <ul><li>The user name or password provided is incorrect.</li></ul>
        // </div>
        _browser.Manager.ActiveBrowser.AutoDomRefresh = true;
        _browser.Manager.ActiveBrowser.RefreshDomTree();
        System.Threading.Thread.Sleep(500);
        return _browser.Find.ByAttributes<HtmlDiv>(_validationErrorsSelector).Find.ByTagIndex("li",0).InnerMarkup;
    }
}

I can see the value on the screen, but what is returned is an empty string.  It is finding by attribute OK, but the ActiveBrowser DOM does not seem to be what is rendered.

Phil

 

Boyan Boev
Telerik team
 answered on 28 Sep 2016
5 answers
226 views

i have used Telerik testing framework to create regression test. i am also using that regression test to perform security testing(First regression testing then security testing in same unit test).

But since Telerik framework automatically closes the browser when test finishes. But for security testing i need the browser opened till security test finishes.

 

I know there is a "RecycleBrowser" web setting which allows to open a browser till its manager instnace is not disposed, but that is not working for me as expected. It closes the browser after waiting for some time. I want the browser to remain open all the time and it only closes if some manually try to close it.

Let me know if it is possible using telerik framework.

 

 

Elena
Telerik team
 answered on 21 Sep 2016
3 answers
305 views

Hi there,

I am using Telerik for a while for web testing. Up until now I was using to test only with a single tab in browser.

Now I am facing a problem that I cannot create multiple tabs, navigate through tabs programmatic. 

Can someone give me a simple example of how to open 1 browser, create 3 tabs and to retrieve the HtmlControls from each tab?

 

Note: Right now the creation of the tabs and navigation i'm doing it via Hotkeys, a problem I have is that I'm not able to get the HtmlControls from the second and third tab.

Thanks! 

Elena
Telerik team
 answered on 19 Sep 2016
6 answers
381 views

Hello! I am having some trouble with the Manager.Desktop.KeyBoard.TypeText() method. I recorded an action that inserts data into a field as so:

// Enter text '1.01' in 'SSLCERTEVSSLSummarySinglePriceText'
Actions.SetText(Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummarySinglePriceText, "");
            Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummaryServicePriceText.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
ActiveBrowser.Window.SetFocus();
Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummaryServicePriceText.Focus();
Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummaryServicePriceText.MouseClick();
Manager.Desktop.KeyBoard.TypeText("1.01",100);

However the text is not being set in the field. My first attempt at solving was problem was noting that the recorded action was attempting to set the data twice in this code block:

-Actions.SetText(Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummarySinglePriceText, "");
-Manager.Desktop.KeyBoard.TypeText("1.01",100);

 

So I commented out the last 5 lines and ended up with:
Actions.SetText(Pages.EntrustPartnerPortal6.SSLCERTEVSSLSummarySinglePriceText, "");

and inserted my data between the blank quotations. This did not work either, because data was being set on the text field yet upon proceeding, valdiation did not recognize text in the box as if it was blank.

Any help here would be appreciated, if anyone needs more info on how to solve this problem please let me know, thanks!

Elena
Telerik team
 answered on 19 Sep 2016
1 answer
213 views

Hello,

Whever I use Desktop.Keyboard.Keypress, it tries to send the keys to Vidual Studio, instead of the browser being run by Manager.

However, Desktop.Mouse.Click sends its events to the browser. Has anyone had the same issue?

I tried paying with manager instances but it did not help:

Instance.Desktop.KeyBoard.TypeText("google.com");

Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Tab, 1000);

My mouse click code is:

Instance.Desktop.Mouse.Click(MouseClickType.LeftClick, urlCell.GetRectangle());       

Elena
Telerik team
 answered on 14 Sep 2016
8 answers
217 views

Hi all,

I have been dealing with this problem for a while now and im not sure why my program is functioning this way. Whenever I try to click a button on a "pop-up", the automation will click the upper left of the screen, even though the button is near the center of the screen. The "pop-up" is not a new window btw, it is just something that is on the screen. Me and my coworkers are able to automate the other "pop-ups" we use just fine. For some reason though, this one is behaving differently.

Heres the HTMLbutton that im trying to target:

1.<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
2.   <div class="ui-dialog-buttonset">
3.      <button type="button" id="OK" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" role="button">
4.        <span class="ui-button-text">OK
5.</span>
6.</button>
7.</div>
8.</div>

 

So I was wondering, is there like a premade function for clicking coordinates on the window?  or would there be a different way i could approach this?

Garrett
Top achievements
Rank 1
 answered on 02 Sep 2016
8 answers
262 views
Hello,

I am using a generic dialog to identify a message box.
I provided all required details like:
Dialog Title
MatchPartial Title checkbox
ChildWindow text content
Button Partial text
Button id
Handle time out

But when i convert it into C# code,
 the ButtonPartialText and ButtonId arguments are nowhere in that code.
Those two informations must be there.

Thanks,
Prachi
Elena
Telerik team
 answered on 31 Aug 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?