On Error Countinue

2 posts, 0 answers
  1. John
    John avatar
    8 posts
    Member since:
    Jul 2012

    Posted 01 Dec 2014 Link to this post

    Hi,
    When I attempt to see if an item is visible, I receive an error when the object is not there.  I do not see an error when it's there.  Is thee a way to find out if it there with out an error when its not?

    Thanks,
    John 



    bool Isthere = false;

    Isthere = Pages.JointCommissionResources17.EnterpriseCell.IsVisible();

    '12/1/2014 3:45:00 PM' - 'Fail' : 3. [PortalSelectOrgList_CodedStep] : RadComboBox('rcbSite'): selecting item with index '0'------------------------------------------------------------Failure Information: ~~~~~~~~~~~~~~~Exception thrown executing coded step: '[PortalSelectOrgList_CodedStep] : RadComboBox('rcbSite'): selecting item with index '0''.InnerException:ArtOfTest.Common.Exceptions.FindElementException: Element Not found!FindExpression used: [id 'Exact' rcbSite] AND [tagname 'Exact' div] at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target) at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType) at ArtOfTest.WebAii.Synchronization.Wait.ForCondition(Func`3 condition, Boolean invertCondition, Object custom, Int32 timeout, WaitResultType errorResultType) at ArtOfTest.WebAii.Synchronization.Wait.ForExists(Int32 timeout, Boolean refreshElement) at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.GetElement(HtmlFindExpression expr, Boolean waitOnElement, Int32 timeout) at ArtOfTest.WebAii.TestTemplates.ElementContainer`2.Get(TFindExpression expr, Boolean waitOnElement, Int32 timeout) at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get(HtmlFindExpression expr) at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](HtmlFindExpression expr) at ArtOfTest.WebAii.TestTemplates.HtmlElementContainer.Get[TControl](String[] clauses) at EProducts1.Pages.JointCommissionResources0Page.get_RcbSiteDiv() in \\jcrfs1\com_software$\TelerikProjects\EProducts\EProducts1\Pages.g.cs:line 664 at EProducts1.PortalSelectOrgList.PortalSelectOrgList_CodedStep() in \\jcrfs1\com_software$\TelerikProjects\EProducts\EProducts1\Portal\PortalSelectOrgList.tstest.cs:line 63
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1045 posts

    Posted 04 Dec 2014 Link to this post

    Hello John,

    Try replacing this step with WaitForVisible one:

    Pages.JointCommissionResources17.EnterpriseCell.Wait.ForVisible(30000);

    You can also add a wait for exist the element and then verify it whether is it visible or not. 

    See this article.

    Let me know if this helps.

    Regards,
    Boyan Boev
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top