Interface BrowserAssertions

All Known Implementing Classes:
PlaywrightBrowserValidationsBuilder, WebDriverBrowserValidationsBuilder

public interface BrowserAssertions
Public contract for browser-level hard/soft validation starters.
  • Method Details

    • attribute

      NativeValidationsBuilder attribute(String browserAttribute)
    • url

    • title

    • alertText

      default NativeValidationsBuilder alertText()
      Starts an assertion against the current browser alert, confirm, or prompt dialog text.
      Returns:
      a native validation builder for alert text comparisons
    • text

    • matchesScreenshot

      default ValidationsExecutor matchesScreenshot()
      Asserts that the current page matches its baseline full-page screenshot. Executes immediately, like every other assertion.
      Returns:
      a ValidationsExecutor object to optionally set a custom validation message
    • matchesScreenshot

      default ValidationsExecutor matchesScreenshot(VisualComparisonOptions options)
      Asserts that the current page matches its baseline full-page screenshot, using the given diff-budget/mask options (see VisualComparisonOptions). Executes immediately.
      Parameters:
      options - the visual comparison options (diff budgets, masks), or null for defaults
      Returns:
      a ValidationsExecutor object to optionally set a custom validation message