Telerik Forums
Testing Framework Forum
5 answers
134 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
151 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
214 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
295 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
369 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
207 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
198 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
245 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
6 answers
165 views

Invoke blur event is failing to execute in IE 11 for Test studio latest version 2016.2. It worked fine in earlier version of test studio across all the browser. I need to invoke this event for invoking call to a webservice. Can anybody help me in resolving this issue.

 

 

'7/11/2016 2:54:08 PM' - 'Fail' : 64. Invoke 'OnBlur' event on 'C1C3QUELICENSENUMBERText'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
ExecuteCommand failed!
InError set by the client. Client Error:
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeEvent(IHTMLElement target, BrowserCommand command)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeEvent',Target:'ElementId (tagName: 'input',occurrenceIndex: '74')',Data:'onblur--@@--null',ClientId:'Client_007162c7-bb26-4f8e-a68b-32c177fccba3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeEvent(IHTMLElement target, BrowserCommand command)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeEvent(IHTMLElement target, BrowserCommand command)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeEvent',Target:'ElementId (tagName: 'input',occurrenceIndex: '74')',Data:'onblur--@@--null',ClientId:'Client_007162c7-bb26-4f8e-a68b-32c177fccba3',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeEvent(IHTMLElement target, BrowserCommand command)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.InvokeEvent(Element targetElement, ScriptEventType eventType)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.InvokeEventActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'7/11/2016 2:54:08 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'7/11/2016 2:54:08 PM' - Overall Result: Fail
'7/11/2016 2:54:08 PM' - Duration: [1 min: 19 sec: 4 msec]
------------------------------------------------------------
'7/11/2016 2:54:09 PM' - Test completed!

Konstantin Petkov
Telerik team
 answered on 29 Aug 2016
3 answers
188 views
When I click on the link in the Silverlight application mene should open a new html page, but instead opens another page with the headline "blank page". This happens on a clean windows server 2012 r2 in IE11. In win8 IE11 and other browsers it does not happen. I've tried a lot of options and they did not fit me. I set up on the basis of the article (http://docs.telerik.com/teststudio/user-guide/configure-your-browser/internet-explorer.aspx). Can someone faced with this problem? How can I fix this problem? What settings should be included in the IE? Thanks in advance.
Boyan Boev
Telerik team
 answered on 23 Aug 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?