Hi ,
I have an input that require simulated manual entry in order to trigger the validation. I selected ;'simulate manual typing' for my recorded step and everything worked fine.
Now, when I convert the recorded step to a coded step, the step fails.
Here's the coded step..
[CodedStep(@"Enter Comment Text 'Automation Test'")]
public void enter_Address_data_CodedStep3()
{
// Enter text 'Automation Test' in 'NewAddressdescriptionTextArea'
Actions.SetText(Pages.MicrosoftDynamicsCRM.FrameContentIFrame.NewAddressdescriptionTextArea, "");
Pages.MicrosoftDynamicsCRM.FrameContentIFrame.NewAddressdescriptionTextArea.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
ActiveBrowser.Window.SetFocus();
Pages.MicrosoftDynamicsCRM.FrameContentIFrame.NewAddressdescriptionTextArea.Focus();
Pages.MicrosoftDynamicsCRM.FrameContentIFrame.NewAddressdescriptionTextArea.MouseClick();
Manager.Desktop.KeyBoard.TypeText("Automation Test",50,100,true);
}
and the exception...
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Enter text 'Automation City' in 'CityText''.
InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
System.ArgumentException: Tag collection of 'input' elements is either empty or has less elements than the element occurrence requested. RequestedIndex: '8', ElementLength: '0'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'SetText',Target:'ElementId (tagName: 'input',occurrenceIndex: '8')',Data:'',ClientId:'Client_fc23a956-34ef-4a07-a35b-70219db7cf85',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.ArgumentException: Tag collection of 'input' elements is either empty or has less elements than the element occurrence requested. RequestedIndex: '8', ElementLength: '0'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
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.SetText(Element targetElement, String text)
at ArtOfTest.WebAii.Core.Actions.SetText(Control targetControl, String text)
at TestProject2.enter_Address_data.enter_Address_data_CodedStep2() in f:\New folder\Test Studio Projects\TestProject2\Address\Steps\enter Address data.tstest.cs:line 239
Any help would be appreciated.
Thanks,
dan
Hello, Hi.
I want to ask one question regarding the title above. How do I do for test drag and drop? because I have to drag the element and drop it at some space then it will popup some data. How I can do that? can you please teach me because I am still beginner for test studio.
Hello,
Does anyone know how to access the name of the current test list inside a coded step?
Thanks,
Steve
Hello,
Our web application uses Common Access Card for authentication. For those who are not familiar with CAC smart card, here is the definition:
"The CAC, a "smart" card about the size of a credit card, is the standard identification for active duty uniformed service personnel, Selected Reserve, DoD civilian employees, and eligible contractor personnel."
http://www.cac.mil/
When I recorded the test, I logged in with using my CAC card (CAC card is physically connected to the computer through a CAC card reader using USB cable). The test executed and passed. No problem there. If I remove the CAC card and run the test it would not work. I get alert message requesting to insert CAC card. The fact that I have to leave my CAC card in all the time when I run the test can be a potential issue down the road. I'm just wondering if there is any kind of support for CAC card in the Test Studio. What I ultimately wanted to do is not having to keep my CAC card physically at the machine when I run the test. Does anyone have any suggestions?
Thank you!
Jun