Hi,
There is a button on a dailog form in my application. Tool is regconising the button through code, Iam ablte create an element instance but it is throwing error when click event is called. Pls advise what is wrong
below is the error displayed in exception
ExecuteCommand failed!
InError set by the client. Client Error:
System.ArgumentException: Tag collection is either empty or has less elements than the element occurrence requested. RequestedIndex: '3', ElementLength: '1'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'Click',Target:'ElementId (tagName: 'button',occurrenceIndex: '3')',Data:'',ClientId:'Client_ae6b05e1-a3ca-49fe-a64d-c829bbbe3b52',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.ArgumentException: Tag collection is either empty or has less elements than the element occurrence requested. RequestedIndex: '3', ElementLength: '1'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
Here i am attaching the screen shot of the Exception. below is the button code in that form.
<BUTTON style=\"WIDTH: 80px\" id=cmdCancel class=pagebutton onclick=Page.CloseDialog(); fpId=\"3485\" nodis="False">Cancel</BUTTON> .
I tried it by recording but no actions recored on it.
Thanks
Ravi
There is a button on a dailog form in my application. Tool is regconising the button through code, Iam ablte create an element instance but it is throwing error when click event is called. Pls advise what is wrong
below is the error displayed in exception
ExecuteCommand failed!
InError set by the client. Client Error:
System.ArgumentException: Tag collection is either empty or has less elements than the element occurrence requested. RequestedIndex: '3', ElementLength: '1'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'Click',Target:'ElementId (tagName: 'button',occurrenceIndex: '3')',Data:'',ClientId:'Client_ae6b05e1-a3ca-49fe-a64d-c829bbbe3b52',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'0',InError:'True',Response:'System.ArgumentException: Tag collection is either empty or has less elements than the element occurrence requested. RequestedIndex: '3', ElementLength: '1'
at ArtOfTest.InternetExplorer.IECommandProcessor.FindElement(ElementIdMessage id)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.
Here i am attaching the screen shot of the Exception. below is the button code in that form.
<BUTTON style=\"WIDTH: 80px\" id=cmdCancel class=pagebutton onclick=Page.CloseDialog(); fpId=\"3485\" nodis="False">Cancel</BUTTON> .
I tried it by recording but no actions recored on it.
Thanks
Ravi