Telerik Forums
Test Studio Forum
3 answers
116 views
Hi

I am trying to write a vb script to generate a random text to be inserted into text box. how do I extract the random text from script to the textbox? any help is appreciated.

Thanks
Plamen
Telerik team
 answered on 13 Feb 2012
1 answer
197 views
In order to get around not being able to manipulate flash objects, I decided create inserts in the backend since we are not concerned with how the flash object operates, but it is essential to our product.  

 

thisCommand.CommandText = "INSERT INTO TEST VALUES('TEST')"
(Test table only has 1 column)

 


For some reason I can't write into a sql server database from Telerik.  I have been able to read  though.  The line of code above does nothing and script step still passes.  I have used the same connection string and command in a .vb file and have been able to insert.  Is there something that I am missing?

Thanks,

Jonathan


Stoich
Telerik team
 answered on 13 Feb 2012
4 answers
371 views
Hi Folks,

I want to compare two variables in my script.  The scenario is that I:
   1) extract the current value from a dropdown and bind to a variable
   2) do something (to make the value change)
   3) extract the new value from the dropdownb and bind to a different variable
   4) compare the two values.  If the values match, the test passes.

These are my two extract lines:
Extract selection 'ByText' on 'UserInterfaceThemeNameSelect' into DataBindVariable $(SchemeChosen1)
Extract selection 'ByText' on 'UserInterfaceThemeNameSelect' into DataBindVariable $(SchemeChosen2)

In code I would use an IF...ELSE statement, but I really want to avoide using code.  Is there a native solution?  (I've briefly searched the forum and didn't find anything that answered my specific query, but if you know of a thread - or a video - please tell me).

If there is no native solution, would someone help with the coding (VB)?

Thanks,
Ngiel Edwards, Transition COmputing.
Nigel
Top achievements
Rank 2
 answered on 13 Feb 2012
3 answers
240 views
I'm getting weird COM exceptions. I can't seem to be able to click on (or execute Open command) on a drop down first time (then second time it opens and clicks on the right choice, but then it gives me COM exceptions... an example (I've also gotten System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL as well):

Failure Information: 
~~~~~~~~~~~~~~~
ExecuteCommand failed!
InError set by the client. Client Error:
System.Runtime.InteropServices.COMException (0x80020006): Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":{"ObjectName":"$root","Path":"\/page:-1:52176326","Properties":[]},"Reference2":null,"Type":4,"Value":"GkMk3aAbn2KaxwITLjrzy0pr\/Kk="}',ClientId:'Client_589f167e-dce9-452a-94fb-601859634ba0',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x80020006): Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.


InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.Runtime.InteropServices.COMException (0x80020006): Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":{"ObjectName":"$root","Path":"\/page:-1:52176326","Properties":[]},"Reference2":null,"Type":4,"Value":"GkMk3aAbn2KaxwITLjrzy0pr\/Kk="}',ClientId:'Client_589f167e-dce9-452a-94fb-601859634ba0',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x80020006): Unknown name. (Exception from HRESULT: 0x80020006 (DISP_E_UNKNOWNNAME))
   at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
   at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(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.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
   at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetVisualTree(IAutomationPeer root, String hash)
   at ArtOfTest.WebAii.Silverlight.VisualTree.Refresh()
   at ArtOfTest.WebAii.Silverlight.FrameworkElement.Refresh()
   at Telerik.WebAii.Controls.Xaml.RadComboBox.WaitDropDownAnimation(Int32 millis)
   at Telerik.WebAii.Controls.Xaml.RadComboBox.SelectItem(String itemText, Boolean openDropDown)
   at Telerik.WebAii.Design.Translators.Xaml.Input.ComboBox.ActionDescriptors.SelectItemNew.ComboBoxSelectAction.Execute(IApplication appHost)
   at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
Anthony
Telerik team
 answered on 10 Feb 2012
2 answers
105 views
Hi

While i am rerunning my captured script,its trowing error.As per my understanding perhaps telerik not supporting object within combo box and drop down menu.
Please help me out.

Regards
Ranjith
Divya
Top achievements
Rank 1
 answered on 10 Feb 2012
1 answer
123 views
Hi team,
I upgrade telerik to version 2011.2.1305.0 on both schedule server and execution server Recently, when i schedule a test list, it succeeded to work on ES, but after a period of time, telerik schedule service on ES is stoped and scheduled test list is not finished. can you help to resolve it?
Stoich
Telerik team
 answered on 09 Feb 2012
3 answers
108 views
Just installed this version and noticed when I now copy test steps from one test to a new test they paste in reverse order, I have to save the new test, close the project and then re-open it before the steps are in the correct order. This was not the case in V2011.1.502.0.
Plamen
Telerik team
 answered on 09 Feb 2012
9 answers
171 views
I'm currently evaluating telerik for our QA team.  I have created a main script that calls several little scripts that I have recorded such as (logIn, clientInfoForm, involvedParties, and MedicalCodes).  For clientInfoForm and involvedParties, I am binding information from excel since each field only requires a distinct value.  However, I want to be able to execute the code in the MedicalCodes script for every medical code that exists in the excel spreadsheet for this case.  Without looping through the other scripts within the main script.  

I want to do something like the following for the MedicalCodes script:

Pages.Page.MedicalLink.Click

dim excelConnectionString

'This  will need to read how many rows exists for a particular column.
'One each iteration execute the following commands

While Not rows.eof 

Pages.Page.Textbox1.Entertext 'From excel
Pages.Page.AddButton.Click

rows.MoveNext

Wend



'Thanks
Cody
Telerik team
 answered on 08 Feb 2012
1 answer
136 views


Hi,

Actually I copy some of my test cases in a server machine. All of them run correctly on my machine but when I put them on the Server Machine and try to run them, the test cases that have Handle "Generic" Dialog, fail on this step.

My machine have following configuration:
IE 8.0.7600.16385
Windows 7 Professional

Server Machine:
IE 8.0.7601.17514
Windows Server 2008 R2 Standard

Not sure if some of this configuration affect the handle dialog feature form WebUi

Following is an example of the log from a test case that try to execute a hadle dialog step


Overall Result: Fail
------------------------------------------------------------
'2/2/2012 6:35:16 PM' - Using .Net Runtime version: '4.0.30319.1' for tests execution.
'2/2/2012 6:35:16 PM' - Starting execution....
'2/2/2012 6:35:16 PM' - Detected a Silverlight Test. Setting EnableSilverlight=True
------------------------------------------------------------
------------------------------------------------------------
'2/2/2012 6:35:20 PM' - Using 'InternetExplorer' version '8.0' as default browser.
'2/2/2012 6:37:23 PM' - 'Pass' : 1. Execute test 'BVT - Create Shortcut For A Panel'

>>> Test-as-Step 'Framework\BVT\BVT - Create Shortcut For A Panel.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'2/2/2012 6:35:24 PM' - Using 'InternetExplorer' version '8.0' as default browser.
'2/2/2012 6:37:03 PM' - 'Pass' : 1. Execute test 'Create New Panel'

>>> Test-as-Step 'Create New Panel.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'2/2/2012 6:35:24 PM' - Using 'InternetExplorer' version '8.0' as default browser.
'2/2/2012 6:36:17 PM' - 'Pass' : 1. Execute test 'BVT - Create A New Workspace'

>>> Test-as-Step 'BVT - Create A New Workspace.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'2/2/2012 6:35:25 PM' - Using 'InternetExplorer' version '8.0' as default browser.
'2/2/2012 6:36:03 PM' - 'Pass' : 1. Execute test 'Login'

>>> Test-as-Step 'Login.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'2/2/2012 6:35:25 PM' - Using 'InternetExplorer' version '8.0' as default browser.
'2/2/2012 6:35:33 PM' - 'Pass' : 1. Navigate to : '/'
'2/2/2012 6:35:37 PM' - 'Pass' : 2. LeftClick on Item0Textboxview
'2/2/2012 6:35:39 PM' - 'Pass' : 3. Type 'Stress002' into UserNameTextbox
'2/2/2012 6:35:40 PM' - 'Pass' : 4. LeftClick on Item1Textboxview
'2/2/2012 6:35:42 PM' - 'Pass' : 5. Type 'Stress002' into PasswordPasswordbox
'2/2/2012 6:35:42 PM' - 'Pass' : 6. Click ButtonLoginButton
'2/2/2012 6:36:03 PM' - 'Pass' : 7. Wait for '20000' msec.
------------------------------------------------------------
'2/2/2012 6:36:03 PM' - Overall Result: Pass
'2/2/2012 6:36:03 PM' - Duration: [0 min: 37 sec: 810 msec]
------------------------------------------------------------

<<< Test-as-Step 'Login.tstest' log ends.

'2/2/2012 6:36:06 PM' - 'Pass' : 2. LeftClick on ImageImage
'2/2/2012 6:36:10 PM' - 'Pass' : 3. Drag Item0Textboxview to application at (531, 153) from TopLeftCorner
'2/2/2012 6:36:12 PM' - 'Pass' : 4. Type 'name1' into WorkspaceNameTextBoxTextbox
'2/2/2012 6:36:13 PM' - 'Pass' : 5. LeftClick on ImageImage2
'2/2/2012 6:36:14 PM' - 'Pass' : 6. LeftClick on MainHeaderRectRectangle
'2/2/2012 6:36:17 PM' - 'Pass' : 7. Wait for '3500' msec.
------------------------------------------------------------
'2/2/2012 6:36:17 PM' - Overall Result: Pass
'2/2/2012 6:36:17 PM' - Duration: [0 min: 52 sec: 718 msec]
------------------------------------------------------------

<<< Test-as-Step 'BVT - Create A New Workspace.tstest' log ends.

'2/2/2012 6:36:18 PM' - 'Pass' : 2. LeftClick on ImageImage0
'2/2/2012 6:36:19 PM' - 'Pass' : 3. Wait for '1000' msec.
'2/2/2012 6:36:21 PM' - 'Pass' : 4. Verify 'NavigatorTextblock' text Same 'Navigator'
'2/2/2012 6:36:22 PM' - 'Pass' : 5. Desktop command: LeftClick on NavigatorTextblock
'2/2/2012 6:36:22 PM' - 'NotRun' : 6. Manual: Click on the "Navigator" panel type
'2/2/2012 6:36:27 PM' - 'Pass' : 7. Wait for '5000' msec.
'2/2/2012 6:36:32 PM' - 'Pass' : 8. Open 'DropDownControlDropdowncontrol' drop down.
'2/2/2012 6:36:33 PM' - 'Pass' : 9. Wait for '1000' msec.
'2/2/2012 6:36:34 PM' - 'Pass' : 10. Desktop command: LeftClick on MainTextBlockTextblock
'2/2/2012 6:36:36 PM' - 'Pass' : 11. Open 'DropDownControlDropdowncontrol0' drop down.
'2/2/2012 6:36:46 PM' - 'Pass' : 12. Wait for '10000' msec.
'2/2/2012 6:36:47 PM' - 'Pass' : 13. Desktop command: LeftClick on MainTextBlockTextblock0
'2/2/2012 6:36:48 PM' - 'Pass' : 14. Desktop command: LeftClick on NewRadbutton
'2/2/2012 6:37:03 PM' - 'Pass' : 15. Wait for '15000' msec.
'2/2/2012 6:37:03 PM' - 'NotRun' : 16. LeftClick on ImageImage1
'2/2/2012 6:37:03 PM' - 'NotRun' : 17. Wait for '3000' msec.
------------------------------------------------------------
'2/2/2012 6:37:03 PM' - Overall Result: Pass
'2/2/2012 6:37:03 PM' - Duration: [1 min: 38 sec: 965 msec]
------------------------------------------------------------

<<< Test-as-Step 'Create New Panel.tstest' log ends.

'2/2/2012 6:37:05 PM' - 'Pass' : 2. Desktop command: LeftClick on ShortcutButtonButton
'2/2/2012 6:37:17 PM' - 'Pass' : 3. Drag Item0Textboxview0 to application at (518, 405) from TopLeftCorner
'2/2/2012 6:37:19 PM' - 'Pass' : 4. Type 'PIN Panel' into InputTextValueTextbox
'2/2/2012 6:37:20 PM' - 'Pass' : 5. Desktop command: LeftClick on BackgroundGradientRectangle
'2/2/2012 6:37:23 PM' - 'Pass' : 6. Wait for '3000' msec.
------------------------------------------------------------
'2/2/2012 6:37:23 PM' - Overall Result: Pass
'2/2/2012 6:37:23 PM' - Duration: [1 min: 59 sec: 126 msec]
------------------------------------------------------------

<<< Test-as-Step 'Framework\BVT\BVT - Create Shortcut For A Panel.tstest' log ends.

'2/2/2012 6:37:24 PM' - 'Pass' : 2. Desktop command: LeftClick on ImageImage2
'2/2/2012 6:37:28 PM' - 'Pass' : 3. Click CloseButtonButton
'2/2/2012 6:37:30 PM' - 'Pass' : 4. Desktop command: LeftClick on NoButton
'2/2/2012 6:37:32 PM' - 'Pass' : 5. Wait for '2000' msec.
'2/2/2012 6:37:33 PM' - 'Pass' : 6. Select tab '1' in TabControl1Tabcontrol
'2/2/2012 6:37:35 PM' - 'Pass' : 7. Wait for '2000' msec.
'2/2/2012 6:37:36 PM' - 'Pass' : 8. Desktop command: LeftClick on PINPanelTextblock
'2/2/2012 6:37:43 PM' - 'Pass' : 9. Wait for '7000' msec.
'2/2/2012 6:37:44 PM' - 'Pass' : 10. Desktop command: HoverOver on Item44Image
'2/2/2012 6:37:45 PM' - 'Pass' : 11. Desktop command: LeftClick on Item44Image
'2/2/2012 6:37:48 PM' - 'Pass' : 12. Wait for '3000' msec.
'2/2/2012 6:37:54 PM' - 'Fail' : 13. Handle 'Generic' dialog.
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Timed out waiting '5000' msec. for any dialog to be handled '1'
InnerException:
System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1'
   at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'2/2/2012 6:37:55 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'2/2/2012 6:37:55 PM' - Overall Result: Fail
'2/2/2012 6:37:55 PM' - Duration: [2 min: 34 sec: 215 msec]
------------------------------------------------------------
'2/2/2012 6:38:16 PM' - Test completed!

 


Thanks,

Stoich
Telerik team
 answered on 07 Feb 2012
25 answers
384 views
hi,
i have a test that run great.
simply, for on e step i do customize step in code , run , and the test doesn't work.
error on the step:
Exception thrown executing coded step: '[DNN_TEST_NB_OF_CLAIMS__UYW1_CodedStep] : Click 'DnnCtr911NewParameterBtnOkImage''
Cody
Telerik team
 answered on 07 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?