Webdriver wait is not working

hi i am using below wait method to wait element to be clickable, but its not working. my script is executing till end without waiting

WebDriverWait wait = new WebDriverWait(Driver.DRIVER, 420 );
	System.out.println("code is not working");

If element is clickable from the start it doesn’t wait, if not it waits until it is and then it continues.

Maybe you want a click on the element after the wait?

scenario is book is downloading and i dont know when it will completely downloaded.
there is thumbnail image where download percentage loader is displaying, and after download completes ,then i have to click on thumbnail image

please help anyone…
what to do in this case…


public boolean isSomeElementLoaded() {
        PageFactory.initElements(new AppiumFieldDecorator(driver, 1, TimeUnit.SECONDS), this);
        for (int i=0; i<60; i++) { //60x1 = 60sec
            if (!driver.findElements(MobileBy.id("your_id")).isEmpty()) {
                return true;
        PageFactory.initElements(new AppiumFieldDecorator(driver, 10, TimeUnit.SECONDS), this); //where 10 is default waiting time
        return false;

Use implicit wait e.g. driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

i solved using invisible element wait
thanks all for ur valuable time.

Hi ,
I am trying click on the element once its available.
Client receives an incoming call(asynchronous) with Call End option.
Script has to wait until the “Call End” element is visible on the screen
The below code doesn’t wait until the element is visible. it’s immediately ending the execution.

Please help me.

public static WebElement inCallcheck;

inCallcheck= driver.findElementByXPath("//android.widget.Button[contains(@text,‘call end’)]");
WebDriverWait callButwait= new WebDriverWait(startServer.driver, 40);