Hi everyone.
We are testing a web-application with framed main window, so our tests look lite that:
Here you can see finding a button in the first frame and then clicking it in five different ways.
The html code is like that:
and the frame_a.html is
But after I tested the code, I discovered that FF fails to click on it almost in every case, and IE fails in the last two.
Though the code and HTML page seem valid, could somebody, please, tell what is wrong?
Using IE 7, FF 3.6.7 and 3.5.1, WebAii 2.0 the lates build.
The error produced is like
Thanks
Yaroslav
We are testing a web-application with framed main window, so our tests look lite that:
Settings mySettings = new Settings(BrowserType.FireFox, @"d:\");mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;Manager myManager = new Manager(mySettings);myManager.Start();myManager.LaunchNewBrowser();myManager.ActiveBrowser.NavigateTo("file:///d:/test.html");Element mybtn = myManager.ActiveBrowser.Frames[0].Find.ByName("press_me");HtmlControl htmlControl = new HtmlControl(mybtn);//fine in IE and FFhtmlControl.Click(); //error in FF onlyhtmlControl.MouseClick(MouseClickType.LeftClick); //error in FF onlymyManager.Desktop.Mouse.Click(MouseClickType.LeftClick, mybtn.GetRectangle());//error in IE and FFmyManager.ActiveBrowser.Actions.Click(mybtn);//error in FF and IEmyManager.ActiveBrowser.Actions.InvokeEvent(mybtn, ScriptEventType.OnClick);myManager.Dispose();Here you can see finding a button in the first frame and then clicking it in five different ways.
The html code is like that:
<html><head></head><frameset cols="25%,*,25%"> <frame src="frame_a.html" /> <frame src="frame_b.html" /> <frame src="frame_c.html" /></frameset></html>and the frame_a.html is
<html><body><input type="button" name="press_me" value="press_me" onclick="alert('Hello world!')"/></body></html>But after I tested the code, I discovered that FF fails to click on it almost in every case, and IE fails in the last two.
Though the code and HTML page seem valid, could somebody, please, tell what is wrong?
Using IE 7, FF 3.6.7 and 3.5.1, WebAii 2.0 the lates build.
The error produced is like
Unhandled Exception: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: 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: '0', ElementLength: '0' 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: 'input',occurrenceIndex: '0')',Data:'',ClientId:'Client_44818831-9568-46b5-9a23-3ad5285d5c64',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.ArgumentException: Tag collection is either empty orhas less elements than the element occurrence requested. RequestedIndex: '0', ElementLength: '0' 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. 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.Click(Element targetElement) at testMouseClick.Program.Main(String[] args) in C:\Documents and Settings\My Documents\Visual Studio 2008\Projects\testMouseClick\testMouseClick\Program.cs:line 42Thanks
Yaroslav