Telerik Forums
Test Studio Forum
6 answers
92 views

Hello,

I am writing a test to work on a RichTextBox (Silverlight) which has several hundred Text Box elements.  Tasks include both typing in as well as content verification.  I have run into a couple of issues - hoping someone can help.

a) I am trying to type in a string at a specific location (for example, in between two text elements).  I have written a coded step (clicks on one of the text boxes) that gets the cursor to the correct position.  I then have a Type Text statement (tried both recorded as well as a coded step) that types in a string.  I am expecting the string to be typed in at the cursor position - however, the text shows up somewhere above the cursor (on a different line). 

Is there anything I can do to get the test to type in at the desired location?

Here is the relevant code:

// LeftClick on Textblock10
RashOnTheTextblock2.User.Click(ArtOfTest.WebAii.Core.MouseClickType.LeftClick, 73, 43, ArtOfTest.Common.OffsetReference.TopLeftCorner, ArtOfTest.Common.ActionPointUnitType.Percentage, ((System.Windows.Forms.Keys)(0)));
 
// Type 'upperarm' into RichTextEditorClinicalNoteRichtextbox5
RichTextEditorClinicalNoteRichtextbox5.User.TypeText("upperarm", 10, 100, true);



b) Is there a fast way to collect all the text boxes in the RichTextBox into an IList or another collection element and/or to find all TextBlocks matching a certain text or another property?  

Here is my current code:

IList<TextBlock> rtbCurrentPNLines;
 
// Get all lines in the current progress note.
// NOTE:  The array will contain lines that are empty or are not visible to the eye in the Progress Note ("Spelling Suggestions", "Name:", "Url" - these are the last 3 lines in the array).
rtbCurrentPNLines = rtbNote.Find.AllByType<TextBlock>();

 

// Get all instances of multiply occurring text (that this test will use)
// 'PROBLEM '
PROBLEMTextBlocks = PNContents.Where<TextBlock>((a_) => (a_).Text.Equals("PROBLEM ")).ToList<TextBlock>();

The problem with both the above is that it takes several seconds to execute each of the above - the first one takes 20+ seconds for about 600+ Text Blocks.    Further, I have to do this multiple times as the contents are changing during the test and verifications have to be done after those changes.  So, as you can imagine, running time of the test is increasing dramatically as the test is further developed. 

NOTE:  None of the text boxes have x:Names or Automation IDs and there are several duplicates - so simple recorded steps for text block verifications does not work.  Content of the note is dynamically generated (they are not in a xaml file).  GIven current release schedules, it is highly unlikely that devs will have time to modify the code to assign x:Names or Automation IDs for us to reference elements directly.

Any help for the above questions would be greatly appreciated.  By the way, I need solutions that will work with the version of TS that I am using (see my signature below).  We do plan to upgrade to a more recent version- but that won't be for a couple of months (at least). Again, the app is a Silverlight application.

Thanks,
Shashi
Test Studio 2012.2.1420.0

Konstantin Petkov
Telerik team
 answered on 05 May 2014
3 answers
100 views
I'm trying to test kendo ui datepicker using test studio, but I can't click the date.
My scenario is,,
I want to go to 2 years before the default date for the different date.
But it doesn't work when i running my project..
Konstantin Petkov
Telerik team
 answered on 03 May 2014
2 answers
67 views
Hello,
We were in the middle of creating a test with everything functioning as it should.
However, out of the blue a page we frequently use/redirect to seems to turn off recording (Recording Toolbar disappears, no steps will record).  We have tried restarting Test Studio/the computer/as well as try a new test and recreate the steps.  

It has been recording just fine up till now, as well as the other pages.  However once arriving, the toolbar goes away and the browser simply acts as a normal browser.
We are focusing on using IE as well.
Konstantin Petkov
Telerik team
 answered on 02 May 2014
5 answers
115 views
I am very new to this testing tool and am tasked with converting our Excel test scripts to Automated Tests.

The challenge I have is that all the examples on the forum for what I am trying to do seem to be in C# and I work in VB - so there is a bit of a translation process there that seems to make things harder.

I need to find out two things from the Web pages we are testing:

First.  I have a Data Grid (not RadGrid) on a page with a column containing text like 'People', 'Places', 'Items' and so on.  To the right of this column I have an "Update" link.  I would like to select the row that the 'Items' text is in, and click on the "Update" link for that row in my test.

Secondly.  I have a RadMenu with a number of items in it that is generated dynamically from the database depending on the permission set of the user logging in.
User 1 might have 3 items - 'People', 'Places', 'Items' whereas User 2 only gets 'People' and 'Places'.  My test is to ensure that the 'Items' menu does NOT appear for User 2 and does appear for User 1.

The actual system is considerably more complex than what I have outlined here and I can't work off the number of items in the menu as User 2 may have 'People', 'Places' and 'Oranges' so both users would have the same number of items.

I know how to get to create a coded step, and have added a number of coded sql queries to verify data that has been entered in the system but the above two issues have held me up for days.

Help would be appreciated and in as basic (pardon the pun) a format as possible.  Step by Step would be ideal.

Thanks
Doyle
Top achievements
Rank 1
 answered on 29 Apr 2014
1 answer
33 views
Hi
Can I know the Test Studio is able to do the both static and dynamic code analysis...? actually we have a .net 3.5 application integrated with oracle database and now our team wants perform dynamic code analysis of the that application is it possible with that tool?
Cody
Telerik team
 answered on 29 Apr 2014
3 answers
103 views
Hi all,

Can anyone provide me a list of files that are required to be included in my source control software?

Thanks,
Kevin
Cody
Telerik team
 answered on 29 Apr 2014
3 answers
243 views
I have a suite of tests which have run successfully for quite some time now for a Silverlight application.

The application is being migrated to Silverlight 5 and I find a few tests failing with some "Element not found" issues.

While resolving these issues, I randomly seem to be running into the following exception for tests that just worked successfully a second before:

Object reference not set to an instance of an 
object.InnerException:System.NullReferenceException: Object reference not set to 
an instance of an object. at 
Telerik.WebAii.Controls.Xaml.RadComboBox.ToggleDropDown() at 
Telerik.WebAii.Design.Translators.Xaml.ComboBox.ComboToggleDropDownAction.Execute(IApplication 
appHost) at 
ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost 
autoHost) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 
order)

When I quit and reopen TestStudio the issue goes away for a while.

My test suite is comprised of recorded sets with a few variable extractions and one coded step to set the value of an extracted variable.

Any advice appreciated.

Thanks

Mathias
Cody
Telerik team
 answered on 25 Apr 2014
3 answers
70 views
I tried looking up info related to this property but was unable to find anything very useful about it. Is this field populated by external means or should I be able to save xml data to this value by adding data to the text field?  Adding data(formated or not) does not appear to be saved when saving a test.
I'm interested in using this field for something along the lines of comments for particular elements for lack of a better feature.

To be clear, I'm referring to XmlBlob property when you click on an element in a test studio test.

Thanks,
Mark
Cody
Telerik team
 answered on 25 Apr 2014
1 answer
57 views
The application I am automating, uses tabbed UI i.e. every new action item opens in a new tab, consequently in a new frame.
I am having a hard time with these frames. The test cases that I record work well on one machine but fail on another.

If possible, kindly provide me some help regarding frames issues.    (Please see Screenshot - Tabbed UI.jpg attached to this email)
Boyan Boev
Telerik team
 answered on 24 Apr 2014
1 answer
86 views

I have tried the Test Studio by adding static data inputs to the application.
Can you help me how to add dynamic data into applications using this tool and also how to take data inputs from external files. 


Kindly let me know.

Regards,
Raghu
Ivaylo
Telerik team
 answered on 24 Apr 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?