@Test
    public void testTwitter() throws InterruptedException {


        try {
            loadDocument();
        } catch (ParserConfigurationException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (IOException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        } catch (SAXException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }

        // Create a new instance of the Firefox driver
        // Notice that the remainder of the code relies on the interface, 
        // not the implementation.
        WebDriver driver = new FirefoxDriver();

        // And now use this to visit Twitter
        driver.get("https://twitter.com");
        // Alternatively the same thing can be done like this
        // driver.navigate().to("https://twitter.com");
        // should open the sign-in page

        // Could be slow ...
        WebElement waitForPageLoad = (new WebDriverWait(driver, 10))
                .until(ExpectedConditions.presenceOfElementLocated(By.xpath("//button[@class = 'submit btn primary-btn flex-table-btn js-submit']")));


        // Are you signed in auto? No?
        WebElement signInNeeded = driver.findElement(By.xpath("//button[@class = 'submit btn primary-btn flex-table-btn js-submit']"));
        // This is OK for confirming the page, but could be dangerous for input -- there are a couple


        if (signInNeeded != null) {


            signIn(driver);

        } else {

            // We're signed into the account and on our Home (feed) page, so change the password
            changePassword(driver);
        }


    };