I am getting an error "Unhandled exception thrown during automation step execution". When I recorded the script,
one of the steps is clicking on a radio control. When I run the script, it is trying to set a button to true and failing.
When I use the Locate in DOM tool, and hover over the Radio Control, it locates the button instead of the Radio Control. I attached a screenshot of the area in the page. I am clicking on the radio labled "Depot Print Label" and the playback is trying to set the button labled as "Find Postcode" to true
This is what was in the test log:
Overall Result: Fail
--------------------------------------------------
'5/25/2010 5:54:52 AM' - 'Pass' : 1. Navigate to : 'https://superuser-uat1.tester.loopone.com/'
'5/25/2010 5:54:53 AM' - 'Pass' : 2. Keyboard (KeyPress) - Tab (1 times) on 'UsernameText'
'5/25/2010 5:54:53 AM' - 'Pass' : 3. Set 'UsernameText' text to 'xxxxxx'
'5/25/2010 5:54:53 AM' - 'Pass' : 4. Set 'LoginPasswordPassword' text to 'xxxxxxxx'
'5/25/2010 5:54:56 AM' - 'Pass' : 5. Keyboard (KeyPress) - Enter (1 times) on 'LoginPasswordPassword'
'5/25/2010 5:54:57 AM' - 'Pass' : 6. Check 'PsushShipmentTypeContractRadio' to be 'True'
'5/25/2010 5:54:57 AM' - 'Pass' : 7. Set 'ValidationNumText' text to 'r998877'
'5/25/2010 5:54:59 AM' - 'Pass' : 8. Click 'ValidateContractNumButton'
'5/25/2010 5:54:59 AM' - 'Pass' : 9. Connect to pop-up window : 'https://superuser-uat1.tester.loopone.com/ship_su_contract_validation.epl?lookup=r998877'
'5/25/2010 5:54:59 AM' - 'Pass' : 10. Click 'SubmitBtnButtonTag'
'5/25/2010 5:55:00 AM' - 'Pass' : 11. Close pop-up window : 'https://superuser-uat1.tester.loopone.com/ship_su_contract_validation.epl?lookup=r998877'
'5/25/2010 5:55:01 AM' - 'Pass' : 12. Set 'PsushCallerNameText' text to 'test'
'5/25/2010 5:55:01 AM' - 'Pass' : 13. Set 'PsushCallerPhoneText' text to '1234'
'5/25/2010 5:55:01 AM' - 'Fail' : 14. Check 'ToFindPostcodeButton' to be 'True'
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unhandled exception thrown during automation step execution
InnerException:
System.ArgumentException: Invalid input type 'Button' for this control. Control was expecting 'Radio'
at ArtOfTest.WebAii.Controls.Control.CreateInstance[TControl](Element e, Boolean throwIfNull)
at ArtOfTest.WebAii.ObjectModel.Element.As[TControl]()
at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.CheckActionDescriptor.Execute(Browser browser)
at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()
--------------------------------------------------
'5/25/2010 5:55:01 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'5/25/2010 5:55:02 AM' - Overall Result: Fail
--------------------------------------------------
Hi
I am trying to count number of columns and column values from a table but everytime I am getting wrong values.
Please check below for the Object Property:
Object Property
<table rules="all" cellspacing="0" cellpadding="3" border="1" style="border-collapse: collapse;" columncount="10" expandedclientidsname="HierarGrid_ExpandedIDs_ResultsGrid_ctl06" class="Datagrid">
Code:
Dim t As HtmlTable = myManager.ActiveBrowser.Find.ByExpression(Of HtmlTable)("class=Datagrid")
Dim Rowcounts As Integer = t.Rows.Count
Dim ColumnCount As Integer = t.ColumnCount()
Row Count is working properly but Column Count is not working properly.
I am using above code to find the number of columns but instead of returning 10 it is returning 2. So please tell me the solution.
Do let me know if I am doing anything wrong.
I find WebUI test studio is a great tool to test Silverlight. I have the following question.
When I record the Silverlight apps, generate c# and run the test case, test cases will open IE, simulate users to use the mouse to click the website. It means I can’t use my mouse to do anything until the test cases finish running.
I know I can find another machine to run my tests. I know VSTS 2010 web tests (coded web tests) just run the tests without opening the browser. Can we just run the tests without opening the browser and without letting the mouse move automatically? Because if control the mouse, the tests can't move on. :)
Thanks,
Ray