Telerik Forums
Test Studio Forum
1 answer
41 views
Hi,

I am using Test Studio to write tests for a WPF client app that communicates with a server.  There is a lot of delay between steps due to server communication, so I'm trying to get rid of all arbitrary sleeps and key off other UI elements to synchronize my test steps.  I'm running into a lot of issues with context menus.  Here is my current approach:

1) Find the element by XamlFindExpression that I want to right-click for a context menu.
2) hover over the element with User.HoverOver()
3) Sleep 200 ms
4) issue a User.Click(MouseClickType.RightClick)
5) refresh the visual trees of my window with win.RefreshVisualTrees()
6) try to find the context menu item by name: win.Find.ByExpression(new XamlFindExpression("XamlTag=MenuItem", "Name=menuItemName");

This works "some" of the time.  However, I have my find strategy set to AlwaysWaitForElementsVisible and timeout set to 30000 ms.  However, when this fails, it returns failure right away, it doesn't wait for the menu item to show up.

Is there a better way to do this?  What am I doing wrong?

Thanks!
Danielle
Cody
Telerik team
 answered on 31 Oct 2014
5 answers
97 views
Dear Telerik,

I am trying to navigate to a different page, but before I can do this, a dialog appears (the IE "leave this page" or "stay on this page" dialog).
I would like to leave the page and go to an other URL.

I already tried several things; using the onbeforeunload handler and by using invoked keypresses. But I cannot get this to work on my test lists while running remotely.

Onbeforeunload:
OnBeforeUnloadDialog dialog = OnBeforeUnloadDialog.CreateOnBeforeUnloadDialog(ActiveBrowser, DialogButton.OK);
Manager.DialogMonitor.AddDialog(dialog);
ActiveBrowser.NavigateTo("/ExterneAanroep.aspx?pagina=wachtwoord-activeren", true);
dialog.WaitUntilHandled(10000);
I also tried to use this.Manager.Settings.UnexpectedDialogAction = UnexpectedDialogAction.HandleAndContinue;, because my testlist needs the global setting set at "Do not handle", but still no success.

Keypress:
ActiveBrowser.NavigateTo("/ExterneAanroep.aspx?pagina=wachtwoord-activeren", true);
Manager.Desktop.KeyBoard.KeyPress(Keys.Enter, 200);
And added the reference system.windows.forms to my project and to the cs file.

What am I missing here?

Regards,
Reinout
Boyan Boev
Telerik team
 answered on 30 Oct 2014
3 answers
118 views
Does Test Studio have a way to select failed tests and run them again?  In NUnit you can automatically select the failed tests and rerun them.  I don't see a way to do something similar in Test Studio.
Boyan Boev
Telerik team
 answered on 30 Oct 2014
2 answers
137 views
I'm having an issue getting telerik to work with our system.

What we want to be able to do is have the automation run through a number of basic features of the system. The problem is that once the automation gets to a certain point, it hangs, waiting for “frame_5”. None of our iframes have IDs or names. We figured out that if we paused the test in the middle and gave the iframe that the automation is trying to use the attribute, “name=’frame_5’”, the automation could continue. We then wrote a JS script to go through and name all the iframes on the page between each step. We confirmed that the script does name the iframes correctly, yet the automation still hangs, waiting for “frame_5” even though the frame is named correctly.

Bottom line: Naming the iframes manually allowed the automation to complete. Naming them with a script did not. We’re not sure why it didn’t work. Perhaps a script isn't the best way to go?
Ivaylo
Telerik team
 answered on 30 Oct 2014
9 answers
239 views
Hello,

I have been having issues with handling a Win32 confirm dialog (trying to click OK in a dialog with OK/Cancel buttons).  In the result log below, notice that the dialog appears to be handled, however Test Studio reports that it is unexpected and the dialog is actually never handled in the UI.  I have tried the following methods and these have not worked...

1. SimulateRealClick (for SubClaimSubmitImage)=false
2. SimulateRealClick=true
3. SimulateRealClick=true and InitializationTime (for dialog)=1000
4. SimulateRealClick=true and InitializationTime=1000 and DisableDialogMonitoring (test list setting)=true
5. SimulateRealClick=true and InitializationTime=1000 and DisableDialogMonitoring (test list setting)=false and UnexpectedDialogAction=HandleAndContinue (it was DoNotHandle until this point)

I then re-recorded the step because we have noticed other dialogs have this issue after the upgrade to 2012.2.1204 and that has worked in some cases, but not this one.  Is there another combo of settings I can try?  What is the recommended method to handle dialogs?

Thanks!
Alan


'2/5/2013 3:30:19 PM' - 'Pass' : 99. Click 'SubClaimSubmitImage'
'2/5/2013 3:30:19 PM' - 'Pass' : 100. Handle 'Confirm' dialog.
'2/5/2013 3:30:20 PM' - LOG: Unexpected dialog encountered. Taking no action.
Cody
Telerik team
 answered on 29 Oct 2014
15 answers
158 views

Hi,

My script is not able to locate a Silverlight control which is inside a RadPanel and it throws Out of bound exception. Here are the steps:

1. I perform a few steps like loading the application, login and other things which are working fine.
2.
I scroll the RadPanel to top of the page and then click it. This expands the RadPanel and here is when the Silverlight Application is loaded. You can now see a Silverlight Hyperlink button. Screenshot name “Step 2”.
3. W
hen I click on the Hyperlink “AddDocumentlink..” the action is recorded and when I try to run the script it doesn’t click this hyperlink and an exception is seen.

The code that is recorded is:
[CodedStep(@"Click AddDocumentLinkHyperlinkbutton", RequiresSilverlight=true)]
        public void AddProduct_CodedStep2()
        {
            // Click AddDocumentLinkHyperlinkbutton 
            Pages.RoadmapGetOnTheMap3.SilverlightApp.AddDocumentLinkHyperlinkbutton.User.Click();
  
     }
Error Message: Exception thrown executing coded step: '[AddProduct_CodedStep2] : Click AddDocumentLinkHyperlinkbutton, RequiresSilverlight=True'.
Exception is:
ArtOfTest.Common.Design.Exceptions.ExecutionException: Exception thrown executing coded step: '[AddProduct_CodedStep2] : Click AddDocumentLinkHyperlinkbutton, RequiresSilverlight=True'. ---> System.InvalidOperationException: Point (223, 1027) outside bounds of browser window: (0, 140, 1366, 565)
   at ArtOfTest.WebAii.Silverlight.UserInteraction.ValidateMouseLocationIfNeeded(Point point)
   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click(MouseClickType clickType, Point offsetPoint, OffsetReference reference)
   at ArtOfTest.WebAii.Silverlight.UserInteraction.Click()
  
at BgRoadmap.AddProduct.AddProduct_CodedStep2() in d:\WebUI Automation\BgRoadmap\AddProduct.aii.cs:line 188
   --- End of inner exception stack trace ---
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteSteps(AutomationStepList stepList, TestResult testResult, Object codeBehindInstance)

Please let me know how can I resolve this. Thanks, Mithul.

 

Boyan Boev
Telerik team
 answered on 29 Oct 2014
3 answers
95 views
I am trying to extract the contents of a combo box, but the only way TS wants to do it is using a absolute method, like tag index, or xpath, or htmlpath. This means that if a designer moves that combo on the page at all my test is broken.

The element which contains the actual text is generated by kendo, and thus I can't code a tag to it to make the test easier. However there is a surrounding take that has a good tag on it (aria-owns="ContactID_listbox"). If I could use a relative index to that item, I may be ok, as the relative index isn't like to change unless kendo's rendering changes.  But I can't seem to find a way to do that.

I realise Test Studio is really meant for Internet Explorer, and the 'kendo' features don't work with Chrome. But we have had to abandon IE due to it's lack of WebSQL support. So if there is a better way to record this extraction that works in Chrome, please suggest.

Thanks,
~Shea M.
Boyan Boev
Telerik team
 answered on 29 Oct 2014
1 answer
51 views
Is there a way I can specify a specify Chrome user to be used when recording and running tests. It is possible to tell chrome which profile to launch with: http://www.chromium.org/developers/creating-and-using-profiles

But how can I make Test Studio use the command switch?

Thanks,
~Shea M
Cody
Telerik team
 answered on 23 Oct 2014
4 answers
230 views
Which files should be put in source control? I am guessing for teams using TFS (the 1%), Test Studio correctly decides, but for people using SVN/Git/Hg, which files should be on the ignore list.

i.e., Should resx files be in there?

Thanks,
~Shea
Boyan Boev
Telerik team
 answered on 23 Oct 2014
7 answers
248 views
Hi there,

Im new to this, I have been passed a set of tests, that I need to now stick in Jira (Zephyr).

Is there any way I can take the steps and export them? I have tried to use the story board, this only works for a full set of tests.

We have several sets all linked to make 1 full set. Can i story board this?

Thanks.
Boyan Boev
Telerik team
 answered on 21 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?