<div id="menuForm:searchMenu" class="dr-menu-label rich-ddmenu-label dr-menu-label-unselect rich-ddmenu-label-unselect" > |
<span id="menuForm:searchMenu_span" class="dr-label-text-decor rich-label-text-decor" >Search</span> |
<div style="border: 0px none ; margin: 0px; padding: 0px; position: relative; z-index: 100;" > |
<div id="menuForm:searchMenu_menu" class="dr-menu-list-border rich-menu-list-border" style="visibility: hidden; z-index: 2; left: -6px; top: 3px; width: 150px;" > |
<div class="dr-menu-list-bg rich-menu-list-bg" > |
<div id="menuForm:_id28" class="dr-menu-item rich-menu-item dr-menu-item-enabled rich-menu-item-enabled" onmouseup="Event.stop(event); " onclick="; ;" style="" > |
<span id="menuForm:_id28:icon" class="dr-menu-icon rich-menu-item-icon" > |
<img height="16" width="16" src="/webInt/spring/a4j_3_1_6.GAimages/spacer.gif" /> |
</span> |
<span id="menuForm:_id28:anchor" class="rich-menu-item-label" > |
<a id="menuForm:generalSearch" onclick="clearFormHiddenParams_menuForm('menuForm');document.forms['menuForm']['menuForm:_idcl'].value='menuForm:generalSearch'; document.forms['menuForm'].submit(); return false;" href="#" > |
General Search |
<script type="text/javascript" ></script> |
</a> |
</span> |
</div> |
<div class="dr-menu-list-strut rich-menu-list-strut" ></div> |
</div> |
</div> |
<script id="menuForm:searchMenu_menu_script" type="text/javascript" ></script> |
</div> |
</div> |
Manager.Settings.DefaultBrowser =
BrowserType.FireFox;
Manager.ActiveBrowser.RefreshDomTree(); SilverlightApp testGame = Manager.ActiveBrowser.Frames.ById(WebAiiPageElements.GAME_FRAMEID).SilverlightApps()[0];
|
System.NullReferenceException: Object reference not set to an instance of an object.
I understand that there is no testsetup run for the Paths class so the inherited BaseTest Manager objectis not instantiated and is not settable to the outer class' Manager referencesince the BaseTest Manager reference is read only.
As I want to keep the helper methods in a separate cs. file, could please advice how should I create a private manager property for
the Paths class (And similar classes) and how to pass the outer class manager in the constructor in order to be able to use a single instantiated Manager object to be used in the different helper classes.
Thanks in advance,
SD.
I need to write a step with conditional logic. According to the user guide, this requires a code-behind method. I'm having a problem handling a confirmation dialog within the code-behind method: the dialog does not get dismissed, and the test fails with a timeout.
I have a pure WebAii test that handles the same confirmation successfully, so I generated a unit test from that and copied the dialog manager code you see below. Is this the wrong technique for use in a code-behind?
[CodedStep(@"Delete customer record if it exists")] |
public void DeleteCustomerIfExists() |
{ |
string emailAddress = "abc@xyz.com"; |
Pages.CustomerSearch.SearchFor.Text = emailAddress; |
Pages.CustomerSearch.SearchButton.Click(false); |
HtmlAnchor customerLink = Find.ByAttributes<HtmlAnchor>("title=" + emailAddress); |
if (customerLink != null) |
{ |
// Handle 'Confirm' dialog. |
ConfirmDialog confirmDialog = new ConfirmDialog(ActiveBrowser, DialogButton.OK); |
Manager.DialogMonitor.AddDialog(confirmDialog); |
// this displays confirmation dialog |
Pages.CustomerSearch.DeleteCustomerButton.Click(false); |
confirmDialog.WaitUntilHandled(5000); |
} |
} |
Thanks!