Java 尝试注销时出现超时异常

Java 尝试注销时出现超时异常,java,selenium-webdriver,explicit,Java,Selenium Webdriver,Explicit,我必须登录yahoomail,然后我必须撰写邮件,然后我必须注销。 我可以登录,但无法注销。请在下面找到相同的代码。 我需要通过明确的等待来完成 WebDriverWait wait = new WebDriverWait(driver,30); driver.findElement(By.id("login-username")).sendKeys("****"); driver.findElement(By.id("login-signin")).click(); /

我必须登录yahoomail,然后我必须撰写邮件,然后我必须注销。 我可以登录,但无法注销。请在下面找到相同的代码。 我需要通过明确的等待来完成

    WebDriverWait wait = new WebDriverWait(driver,30);
    driver.findElement(By.id("login-username")).sendKeys("****");
    driver.findElement(By.id("login-signin")).click();
//  WebElement password=driver.findElement(By.id("login-passwd"));

    WebElement element=wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("login-passwd")));
    element.sendKeys("*****");
    driver.findElement(By.id("login-signin")).click();
    String text=element.getText();

    WebDriverWait wait1=new WebDriverWait(driver, 20);
    WebElement element4=wait1.until(ExpectedConditions.visibilityOfElementLocated(By.id("yucs-mail_link_id")));
    element4.click();

    WebDriverWait wait2=new WebDriverWait(driver, 60);

    WebElement element3=wait2.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@class='btn btn-compose']")));
    driver.findElement(By.xpath("//*[@class='btn btn-compose']")).click();
    //element3.click();


    WebDriverWait wait3=new WebDriverWait(driver, 300);
    WebElement element5=wait3.until(ExpectedConditions.visibilityOfElementLocated(By.id("to-field")));
    element5.sendKeys("****");
    driver.findElement(By.id("subject-field")).sendKeys("Test mail");
    driver.findElement(By.id("rtetext")).sendKeys("Hi ,congrates");
    driver.findElement(By.linkText("Send")).click(); //("yui_3_16_0_ym19_1_1487880655873_2622")).click();

    Actions builder=new Actions(driver);
    WebElement logout=driver.findElement(By.xpath("//li[@id='yucs-profile']/a/i")); //yui_3_16_0_2_1487938370596_76 //.//*[@id='yui_3_10_3_1_1375219693637_127']
    builder.clickAndHold(logout).click().build().perform();     


    WebDriverWait wait4=new WebDriverWait(driver, 30);
    WebElement element9=wait4.until(ExpectedConditions.visibilityOfElementLocated(By.id("yucs-signout")));
    element9.click();

我没有找到任何关于从雅虎邮箱注销的参考。你能找到“注销”路径/id吗?是的,我能找到id和xpath。你能通过增加超时选项来尝试吗?