Browser interactions

Get browser information

Get title

You can read the current page title from the browser:

Move Code

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

Get current URL

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

Move Code

      String url = driver.getCurrentUrl();
title = driver.current_url
            String url = driver.Url;
    current_url = driver.current_url
    let currentUrl = await driver.getCurrentUrl();
driver.currentUrl
Last modified September 26, 2024: added interaction csharp code (#1958) (914d0c5208)