<telerik:RadAjaxPanel ID="ajaxPanel_Activities"runat="server" EnableAJAX="true"LoadingPanelID="loadingPanel_Activities"RequestQueueSize="1"> <div> <ahp:ActivitiesTabPanel runat="server" ID="activitiesTabPanel" /> </div></telerik:RadAjaxPanel>ahp:ActivitiesTabPanel UserControl<div class="wideColumn"> <telerik:RadMultiPage ID="radMultiPage_ActivitiesLists" runat="server" SelectedIndex="0"> <telerik:RadPageView ID="radPageView_ActivitiesListLive" runat="server"> <ahp:ActivitiesList ID="activitiesList_Live" runat="server" NumberOfResults="0" ReferenceActivityGroupName="Activities Page - Lives" OnMouseOver="showActivityContent('{0}', '{1}', '{2}');" OnMouseOut="startTimer();"/> </telerik:RadPageView> </telerik:RadMultiPage><div>ahp:ActivitiesList UserControl<asp:Repeater ID="rptActivities" runat="server" OnItemDataBound="rptActivities_ItemDataBound" > <ItemTemplate> <asp:LinkButton ID="linkTopic" runat="server" Text='<%# Eval("Topic") %>' CommandName="Click" CommandArgument='<%# Eval("ActivityId") %>' OnCommand="activityLink_Command" /> </ItemTemplate></asp:Repeater>ahp:ActivitiesList UserControl.HtmlDiv ajaxPanel = _manager.ActiveBrowser.Find.ById<HtmlDiv>("ctl00_ctl00_cphContent_plcContent_ajaxPanel_Activities"); Thread.Sleep(3000); //Give time for ajaxPanel to load. ReadOnlyCollection<HtmlAnchor> linksInPanel =ajaxPanel.Find.AllByTagName<HtmlAnchor>("a"); HtmlAnchor match = null; foreach (HtmlAnchor ank in linksInPanel ) { if (activities.ActivityTarget[0].Topic.ToLower().Trim() == ank.BaseElement.InnerText.ToLower().Trim()) { match = ank; break; } } Assert.IsTrue(match != null);Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Silverlight] element using
Find logic
(Html): [id 'Exact' silverlightControlHost] THEN UNDER NODE FIND [tagIndex 'Exact' object:0]
(Silverlight): [TextContent 'Exact' LakTestAcc8] AND [XamlTag 'Exact' textblock]
Unable to locate element. Search failed!
--------------------------------------------------
'7/7/2010 5:22:03 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'7/7/2010 5:22:05 AM' - Overall Result: Fail
--------------------------------------------------
Hi,
We're migrating from WebAii 1.1 to WebAii 2.0 and found some problems.
One of them it's a problem with Manager.ActiveBrowser Property.
When I'm using on of these methods:
Manager.ActiveBrowser.WaitUntilReady();
Manager.ActiveBrowser.RefreshDomTree();
I'm receiving an error:
System.NullReferenceException: Object reference not set to an instance of an object.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_e525dafc-eedf-434b-867a-ce3dadb58785',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.NullReferenceException: Object reference not set to an instance of an object.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
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.IsReady()
at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
But when I'm using Manager.Browsers[0] everything is ok, But unfortunately this workaround require us to do huge amount of work, because we have already created a lot of tests (3000+) which now work using WebAii 1.1
Could you assist us with this issue?
Best regards,
Artem Nenashev
| <input id="allocationConfirmationForm:confirmOK" type="button" value="OK" |
| onclick="A4J.AJAX.Submit('allocationConfirmationForm:contentRegion','allocationConfirmationForm',event,{'parameters':{ |
| 'allocationConfirmationForm:confirmOK':'allocationConfirmationForm:confirmOK'} |
| ,'actionUrl':'/vtdWeb/spring/dashboard?execution=e1s2&javax.portlet.faces.DirectLink=true'} );return false;" |
| name="allocationConfirmationForm:confirmOK"/> |
| Element e = Manager.ActiveBrowser.Find.ByName("allocationConfirmationForm:confirmOK"); |
| Manager.ActiveBrowser.Actions.Click(e); |
'6/25/2010 2:49:17 AM' - 'Fail' : 24. Click Item10Hyperlinkbutton
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Unable to locate element. Details: Attempting to find [Silverlight] element using
Find logic
(Html): [id 'Exact' silverlightControlHost] THEN UNDER NODE FIND [tagIndex 'Exact' object:0]
(Silverlight): [XamlTag 'Exact' gridviewvirtualizingpanel] AND [automationid 'Exact' PART_GridViewVirtualizingPanel] THEN UNDER NODE FIND [XamlPath 'Exact' /gridviewrow[6]/grid[name=grid]/datacellspresenter[name=PART_DataCellsPresenter]/stackpanel[0]/horizontalscrollpanel[name=PART_PartialScrollContainer]/gridviewcellspanel[name=PART_GridViewCellsPanel]/gridviewcell[1]/grid[name=SelectionBackground]/alignmentcontentpresenter[name=PART_ContentPresenter]/grid[0]/hyperlinkbutton[0]]
Unable to locate element. Search failed!
--------------------------------------------------
'6/25/2010 2:49:17 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'6/25/2010 2:49:19 AM' - Overall Result: Fail
regards
Dileep.s
--------------------------------------------------
| <div align="right"> |
| <table border="0" width="200" cellpadding="8" style="border-collapse: collapse" bordercolor="#E0DFE3"> |
| <tr> |
| <td> |
| <input type="button" value="<- Back" name="B2" onclick="cancelChange()" > |
| </td> |
| <td> |
| <input type="submit" value="Maint Details ->" name="lnkSubmit"> |
| </td> |
| </tr> |
| </table> |
| </div> |
| HtmlInputSubmit maintDetailsButton = Find.ByAttributes<HtmlInputSubmit>("value=Maint Details ->"); |
| maintDetailsButton.Click(); |
| Assert.IsTrue(ActiveBrowser.Url.Contains(expectedPage), "URL {0} does not contain expected page {1}", ActiveBrowser.Url, expectedPage); |