Hi all,
finally we have managed to reproduce errors we have been experiencing with FF in our application.
So, now we can show you the problem.
The test layout can be found at my free hosting.
The code (both layout and test) may be downloaded from here.
The test code is:
And produces the following error:
Sad but true, it should work, but it doesn't.
Thus we would like our tests work, so it will be great if you tell us how to deal with it.
P.S. This layout is quite similar to the real one. In our application no methods such as Click(), MouseHover() etc work.
Thanks in advance for any ideas.
All the best,
Yaroslav
P.S. Maybe, the problem exists because of our layout being wrapped in one <iframe> element.
I mean that there is one parent iframe which contains all the other elements.
P.P.S. We are using the latest build of WebAii 2.0 and Firefox 3.6.8.
finally we have managed to reproduce errors we have been experiencing with FF in our application.
So, now we can show you the problem.
The test layout can be found at my free hosting.
The code (both layout and test) may be downloaded from here.
The test code is:
var mySettings =
new
Settings(BrowserType.FireFox,
"c:\\log"
);
mySettings.ClientReadyTimeout = 200000;
// Set to false if you are annoyed by red-yellow popups.
mySettings.AnnotateExecution =
true
;
mySettings.UnexpectedDialogAction = UnexpectedDialogAction.DoNotHandle;
var m =
new
Manager(mySettings);
m.Start();
m.LaunchNewBrowser();
if
(!m.ActiveBrowser.Window.IsMaximized)
{
m.ActiveBrowser.Window.Maximize();
}
m.Settings.ExecutionDelay = 100;
m.ActiveBrowser.NavigateTo(
"http://aspspider.ws/kovyar"
);
m.ActiveBrowser.AutoDomRefresh =
true
;
m.ActiveBrowser.WaitUntilReady();
Element loginfield = m.ActiveBrowser.Find.ById(
"ctl00_mainContentPlaceHolder_tbLogin"
);
Element passwfield = m.ActiveBrowser.Find.ById(
"ctl00_mainContentPlaceHolder_tbPassword"
);
m.ActiveBrowser.Actions.SetText(loginfield,
"login"
);
//just to put anything
m.ActiveBrowser.Actions.SetText(passwfield,
"pwd"
);
Element mybtn = m.ActiveBrowser.Find.ById(
"ctl00_mainContentPlaceHolder_LogInButton"
);
mybtn.As<HtmlControl>().Click();
m.ActiveBrowser.WaitForUrl(
"StartPage.aspx"
,
true
, 10000);
m.ActiveBrowser.WaitForFrame(
new
FrameInfo(
"MainFrameSet"
,
null
,
null
, 0), 10000);
m.ActiveBrowser.RefreshDomTree();
var mf = m.ActiveBrowser.Frames.ById(
"MainFrameSet"
);
m.ActiveBrowser.WaitForFrame(
new
FrameInfo(
"frmLeft"
,
string
.Empty,
string
.Empty, 0), 10000);
m.ActiveBrowser.RefreshDomTree();
var f = m.ActiveBrowser.Frames.ById(
"frmLeft"
);
f.WaitUntilReady();
f.RefreshDomTree();
var t = f.Find.ById<HtmlInputText>(
"treeFilterText"
);
t.Click();
// this method doesn't work
t.Text =
"Hey Test!"
;
// neither does that.
And produces the following error:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0
BrowserCommand (Type:'Information',Info:'FrameRectangle',Action:'NotSet',Target:'null',Data:'2',ClientId:'Client_8c806e49-0c9d-48ed-a729-e2c2d2978a5c',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0')
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.FrameInfo.GetRectangle()
at ArtOfTest.WebAii.ObjectModel.Element.GetRectangle()
at ArtOfTest.WebAii.Core.Actions.AnnotateElement(Element targetElement, String message, Boolean isNative)
at ArtOfTest.WebAii.Core.Actions.AnnotateElement(Element targetElement, String actionName, String data, Boolean isNative)
at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
at Tests.Test.Test1() in Test.cs: line 60
Sad but true, it should work, but it doesn't.
Thus we would like our tests work, so it will be great if you tell us how to deal with it.
P.S. This layout is quite similar to the real one. In our application no methods such as Click(), MouseHover() etc work.
Thanks in advance for any ideas.
All the best,
Yaroslav
P.S. Maybe, the problem exists because of our layout being wrapped in one <iframe> element.
I mean that there is one parent iframe which contains all the other elements.
P.P.S. We are using the latest build of WebAii 2.0 and Firefox 3.6.8.