There is a rect object in the dom:
<
The
An Example:
The attributes of
elements are as follows:
x
: This attribute determines the x coordinate of the rect.
y
: This attribute determines the y coordinate of the rect.
width
: This attribute determines the width of the rect.
height
: This attribute determines the height of the rect.
rx
: This attribute determines the horizontal corner radius of the rect.
ry
: This attribute determines the vertical corner radius of the rect.
pathLength
: This attribute lets specify the total length for the path, in user units.
Note: Starting with SVG2 x, y, width, height, rx and ry are Geometry Properties, meaning those attributes can also be used as CSS properties for that element.
As the
element is a SVG element so to locate such elements you have to explicitly specify the SVG namespace when accessing the elements using xpath as follows:
For elements:
//*[name()="svg"]
For
elements:
//*[name()="svg"]/*[name()="g"]
For
elements:
//*[name()="svg"]/*[name()="g"]/*[name()="rect"]
//*[name()="svg"]/*[name()="rect"]
You can find a couple of relevant detailed discussions in