Katalon Studio v5.8 - It's time for the all-new API testing experience
Kuntum Adila
Katalon Apprentice
10/11/2018

Verify element visible

I want to verify element present or not with if statement. if(

WebUI.verifyElementVisible(object')) == true){do someyhing} else {do something}

Katalon detects that the object is visible, actually the object is not visible, so katalon always run if statement. How to verify if the object is not visible and katalon can run else statement?

Upvote
Quote

Comments

  • Mate Mrse
    Katalon Expert
    10/11/2018
    Well, maybe you could add delays or wait for element visible before checking. I also sometimes get suspicous results. Try experimenting with 

    WebUI.waitForElementVisible(), 
    WebUI.verifyElementPresent(),
    WebUI.verifyElementInViewport()


    Upvote
    Quote
  • Kuntum Adila
    Katalon Apprentice
    10/12/2018
    Mate Mrse said:
    Well, maybe you could add delays or wait for element visible before checking. I also sometimes get suspicous results. Try experimenting with 

    WebUI.waitForElementVisible(), 
    WebUI.verifyElementPresent(),
    WebUI.verifyElementInViewport()


    Hi mate,,


    I've tried using it, but it doesn't work on me and I get this error 

    Object 'Object Repository/GFF/Home' is present but is not visible in viewport.
    it should be if the if statement invalid will execute the else statement, but only stop at the if statement and my test case failed
    is there another solution?
    Upvote
    Quote
Sign In or Register to comment.