Browser interactions (original) (raw)

Get browser information

Get title

You can read the current page title from the browser:

Move Code

      String title = driver.getTitle();
            String title = driver.Title;
    current_title = driver.title
    let title = await driver.getTitle();

Get current URL

You can read the current URL from the browser’s address bar using:

Move Code

      String url = driver.getCurrentUrl();
    current_url = driver.current_url
    let currentUrl = await driver.getCurrentUrl();

Development Partners

BrowserStack

Sauce Labs

Selenium Level Sponsors

Support the Selenium Project

Learn more or view the full list of sponsors.