Hi
In the application i have to test has a dialog popup right after
login if the user already as a session open. before the dialog is not expected every
time, the step will fail if the element is not found,
is there a way ignore the step? I already have it set to continue on fail, but
the report will report the failure,
I have tried to verify the element to control an IF else steps, but that fails
if the popup does not "pop"
Please point me in the right direction
Thank You
Chris
ArtOfTest.Common.Design.Exceptions.ElementFindException: Unable to locate element. Details: Attempting to find [Html] element using
Find logic
(Html): [tagname 'Exact' h3] AND [TextContent 'Exact' Login Conflict]
Unable to locate element. Search failed!
at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
// Launch a browser instance
Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
Manager.Current.ActiveBrowser.ClearCache(BrowserCacheType.TempFilesCache);
// The active browser
ActiveBrowser.NavigateTo(
"http://anydomain.com"
);
// Find the google search box and set it to "Telerik";
Find.ByName<HtmlInputText>(
"ctrlLogin$txtUser"
).Text =
"user"
;
// Click the Search button
var loginButton = Find.ByExpression<HtmlSpan>(
new
HtmlFindExpression(
"TextContent=~Login"
,
"class=Button_Text"
));
loginButton.Click();
ActiveBrowser.WaitUntilReady();
var mainFrame = ActiveBrowser.Frames[
"frMain"
];
//mainFrame.RefreshDomTree();
//workFrame is found, workFrame is an iFrame
var workFrame = mainFrame.WaitForElement(5000,
"id=WorkFrame"
);
---- PROBLEM STARTS HERE ---
// form is null here
var form =
new
HtmlControl(workFrame).Find.ById<HtmlForm>(
"MyStart"
);
var td = form.Find.ByAttributes<HtmlTableCell>(
"class=login_value"
);
var loginName = td.InnerText;
<TextBox Grid.Column="1" Grid.Row="0" Width="200" Margin="2,2,20,2" Text="{Binding EditConcept.BusinessEntityName, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, ValidatesOnExceptions=true, NotifyOnValidationError=True}" >