WebElementObject

WebElementObject[]

represents an element of an open webpage operated on by WebExecute.

Details

  • WebExecute supports the following commands related to WebElementObject:
  • "LocateElements"elemgive the list of elements on a webpage matching elem
    "ClickElement"elemclick an element on a webpage (e.g. a hyperlink)
    "HoverElement"elemhover over an element on a webpage
    "TypeElement"{elem,"text"}type text into an element on a webpage (e.g. an input field)
    "SubmitElement"elemsubmit a form using the specified element (e.g. a button)
    "ElementSelected"elemwhether an element is selected
    "ElementEnabled"elemwhether an element is enabled
    "ElementTag"elemthe HTML tag for the element
    "ElementText"elemthe text, if any, associated with an element
    "HideElement"elemmake an element invisible
    "ShowElement"elemmake an element visible

Examples

Basic Examples  (2)

Start a web session:

Open a webpage:

Use WebExecute to locate a WebElementObject link on a page:

Use WebExecute to find the text of a WebElementObject:

Click the WebElementObject link:

Close the session:

Start a web session:

Open a webpage:

Get all the elements for the <p> (paragraph) tag:

Hide all the paragraphs of text on the page:

All text paragraphs are now hidden:

Show the text paragraphs again:

The text has reappeared on the page:

Wolfram Research (2019), WebElementObject, Wolfram Language function, https://reference.wolfram.com/language/ref/WebElementObject.html.

Text

Wolfram Research (2019), WebElementObject, Wolfram Language function, https://reference.wolfram.com/language/ref/WebElementObject.html.

CMS

Wolfram Language. 2019. "WebElementObject." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/WebElementObject.html.

APA

Wolfram Language. (2019). WebElementObject. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WebElementObject.html

BibTeX

@misc{reference.wolfram_2024_webelementobject, author="Wolfram Research", title="{WebElementObject}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/WebElementObject.html}", note=[Accessed: 10-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_webelementobject, organization={Wolfram Research}, title={WebElementObject}, year={2019}, url={https://reference.wolfram.com/language/ref/WebElementObject.html}, note=[Accessed: 10-October-2024 ]}