Element property style Version 11 (Java)

Action group: Browsers


Description

Gets the value of the specified style property of the element

Action icon

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
ContextAction context for working with the browserRobin.SeleniumBrowser contextYes
ElementElement for interactionRobin.WebElement
Yes
Property style nameProperty style nameRobin.String
Yes
Results
ResultProperty style valueRobin.Object

Special conditions of use

https://developer.mozilla.org/ru/docs/Web/CSS/Reference -  list of style properties. 

Example of use

Task

You need to get the style of the fontSize element https://www.google.ru/

Solution

Use the actions: "Open Browser", "Element property style", "Close Browser".

Implementation

  1. Assemble a robot scheme consisting of the following actions:

2. Set the parameters for the "Open Browser" action:

3. Set the parameters of the "Element property style" action. To create an element, use WebSpy (go to Create Web-elements):

4. Set the parameters for the "Close Browser" action:

5. Start the robot by clicking the "Start" button

Result

The element style was successfully retrieved

  • Нет меток