Forum Discussion

Capricornus's avatar
Capricornus
Contributor
3 years ago

Error log despite try... catch operation

Hi everybody, maybe somebody can help me with my issue: Despite of using a try... catch... operation I get an error logged when the try operation fails: try { adobeReader.dlgPrint.cmbPri...
  • Carl9577's avatar
    Carl9577
    3 years ago

    mattb wrote:

    Hi,

    Myself personally I like to use if else statements to look if a object is visible on screen or not, and then continue. 

    If object is invisible refresh the browser code:

     

    function IfObjectInvisible()
    {
    if(!Project.Variables.PageObject.VisibleOnScreen){
    Aliases.browser.Refresh() rapidfs account

    }
    else{
    return true;
    }
    }

    If Object is visible, continue, else refresh the browser

     

    function IfObjectVisible()
    {
    if(Project.Variables.PageObject.VisibleOnScreen){
    return true;
    }
    else{
    Aliases.browser.Refresh()

    }
    }





    I dont know if its a great idea to add an event for ignoring errors. If you were going to, I would recommend adding that within the logic itself, not an event for every error. 


    Thanks for the update. I'll be sure to keep an eye on this thread.