package mypackage;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
public class myclass {
    public static void main(String[] args) {
        String baseUrl = "http://newtours.demoaut.com/";
        FirefoxDriver driver = new FirefoxDriver();
        String underConsTitle = "Under Construction: Mercury Tours";
       ((Object) ((org.openqa.selenium.firefox.FirefoxDriver) (FirefoxDriver) 

        ((FirefoxDriver) driver).get(baseUrl);
        List<WebElement> linkElements = driver.findElements(By.tagName("a"));
        String[] linkTexts = new String[linkElements.size()];
        int i = 0;

        //extract the link texts of each link element
        for (WebElement e : linkElements) {
            linkTexts[i] = ((WebElement) e).getText();

        //test each link
        for (String t : linkTexts) {
           ((FirefoxDriver) driver.findElements(By.linkText(t))).click();
    if (driver.getTitle().equals(underConsTitle)) {
                System.out.println("\"" + t + "\""
                        + " is under construction.");
            } else {
                System.out.println("\"" + t + "\""
                        + " is working.");
            ((FirefoxDriver) driver.navigate()).back();

    private static FirefoxDriver FirefoxDriver(Object manage1) {
        // TODO Auto-generated method stub
        return null;

  • 1
    And your question is? Please provide some context, what are you doing, what is not working, what did you try already. – Niels van Reijmersdal Mar 5 '15 at 8:11
  • What is the error message? Could you post it in its entirety? – Greenonline Jul 2 '15 at 18:08

Actual syntax is :

driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

So in you case please remove 1 from below:

((Object) ((org.openqa.selenium.firefox.FirefoxDriver) (FirefoxDriver) driver.manage1()).timeouts()).implicitlyWait(5, TimeUnit.SECONDS);

| improve this answer | |

((Object) ((org.openqa.selenium.firefox.FirefoxDriver) (FirefoxDriver) driver.manage1()).timeouts()).implicitlyWait(5, TimeUnit.SECONDS);

manage + 1 ? I think your problem is the 1 in this line.

Do you use a IDE (like netbeans), it should show where the error is. Also do you have developers around, they should be able to help you with finding basic runtime issues.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.