BrowserTab class represents a web page to perform automation actions.
Properties #
title
: str, return title of the browser tab.url
: str, return url of the browser tab.is_active
: bool, indicating whether the browser tab is active or not.browser
: Browser, return the parent browser of the tab.
Methods #
Operations related to WebElement of current browser tab
- find_element: return the Web element defined by the given locator.
- find_element_by_xpath: find element by the given XPath.
- find_element_by_css_selector: find element by the given CSS selector.
- find_elements: return list of all matched Web elements by the given locator in current web page.
- find_elements_by_xpath: find elements by the given XPath.
- find_elements_by_css_selector: find elements by the given CSS selector.
- is_existing: check whether the specified element of the web page exists.
- is_existing_by_xpath: check whether the UI element exist or not by the given XPath.
- is_existing_by_css_selector: check whether the UI element exist or not by the given CSS selector.
- wait_appear: wait for the specified element of the web page appearing within given timeout.
- wait_appear_by_xpath: wait for the element to appearing by the given XPath.
- wait_appear_by_css_selector: wait for the element to appear by the given CSS selector.
- wait_disappear: wait for the specified element of the web page to disappear within given timeout.
- wait_disappear_by_xpath: wait for the element to disappear by the given XPath.
- wait_disappear_by_css_selector: wait for the element to disappear by the given CSS selector.
Operations related to the current browser tab