browser.get.html#
Functions#
element_inner(xpath, timeout=None) #
Get inner HTML of an element by XPath.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xpath | str | XPath of the element. | required |
timeout | float | None | In seconds. Timeout to wait for element. If | None |
Returns:
| Type | Description |
|---|---|
str | Inner HTML of an element. |
Example
Get the inner HTML source of an element:
1 2 | |
element_outer(xpath, timeout=None) #
Get outer HTML of an element by XPath.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
xpath | str | XPath of the element. | required |
timeout | float | None | In seconds. Timeout to wait for element. If | None |
Returns:
| Type | Description |
|---|---|
str | Outer HTML of an element. |
Example
Get the outer HTML source of an element:
1 2 | |
page_source() #
Get HTML source of the current page.
Returns:
| Type | Description |
|---|---|
str | HTML page source. |
Example
1 2 | |