Get text Version 12 (Java)

Action group: Browsers


Description

The action gets text from a selected element

Action icon

Action parameters 

Input parameters 

"Context" field - action context for working with the browser.

"Element" field - element for interaction.

"Element text type" field - the method of forming the resulting string.

"Without spaces" field - remove extra spaces and whitespace characters.

Output parameters 

Result - string variable containing the text of the element.

Settings

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with the browser.Robin.SeleniumBrowser contextYes
ElementElement for interactionRobin.WebElement
Yes
Element text typeThe method of forming the resulting stringRobin.String
No
Without spacesRemove extra spaces and whitespace characters.Robin.BooleantrueNo
Results
ResultString variable containing the text of the elementRobin.String

Special conditions of use 

None.

Example of use 

Task

Follow the link https://wiki.rpa-robin.ru/Eng/index.html and get text from the web element.

image2024-2-8_16-31-59.png

Solution

Use the "Open Browser", "Get text", "Close browser" actions. 

Implementation

  1. Assemble a robot scheme with the actions: 
  2. Set the "Open browser" action parameter. 
    image2024-2-8_16-30-45.png
  3. Set the "Get size and element coordinates" action parameter. To create an element use WebSpy (see section Create Web-elements). 

  4. Set the "Close browser" action parameters. 
    image2024-2-8_16-28-24.png
  5. Click "Start" in the top panel. 

Result

The program robot completed successfully. The size and element coordinates were received. 

  • Нет меток