This question is locked. New answers and comments are not allowed.
I'm having trouble figuring out a way to test if a successful message was received from my code. I know the code below is incorrect, I just can't seem to figure out a way to make it work.
What I would like it to do is to wait 10 sec for the text 'Successful' to display and when it doesn't refresh the search and check again, repeat as necessary. I'm having trouble determining a way to test the successful condition.
[CodedStep(@
"Wait for Successful completion of processing"
)]
public
void
CO_CBCOMP_AU_SA_EN_VerifyFunctionalityBlowup_CodedStep4()
{
HtmlSpan UserControl9921DBIREVIEWCOMPOSITEQUEUEReviewCompositeQueueListJobStatusSpan = Pages.UMDealerBusiness7.UserControl9921DBIREVIEWCOMPOSITEQUEUEReviewCompositeQueueListJobStatusSpan;
int
n = 0;
while
( n < 1)
{
UserControl9921DBIREVIEWCOMPOSITEQUEUEReviewCompositeQueueListJobStatusSpan.Wait.ForExists(10000);
Wait.For<HtmlSpan>(c => c.AssertContent().TextContent(ArtOfTest.Common.StringCompareType.Contains,
"Successful"
), UserControl9921DBIREVIEWCOMPOSITEQUEUEReviewCompositeQueueListJobStatusSpan, 10000);
if
(UserControl9921DBIREVIEWCOMPOSITEQUEUEReviewCompositeQueueListJobStatusSpan =
"Successful"
)
{
n++;
}
else
Actions.InvokeScript(
"javascript:__doPostBack('UserControl9921DBIREVIEWCOMPOSITEQUEUE$searchLinkButton','')"
);
}
}