Imen CHOK
Imen CHOK

Reputation: 928

Object Identification using xpath with SeleniumLibrary and robotframework

I'm testing a web application using RobotFramework. I want to identify objects by xpath using the keyword Click Linkbut it didn't work. Every time, i get FAIL Timed out after 5000.0ms. Example: enter image description here

Upvotes: 0

Views: 1620

Answers (1)

Laurent Bristiel
Laurent Bristiel

Reputation: 6935

When you use xpath to identify your locator, you have to specify it in your statement:

Click Link  xpath=//i[2]a(...)

This is mentioned in the library doc: "By default, when a locator value is provided, it is matched against the key attributes of the particular element type. For example, id and name are key attributes to all elements, and locating elements is easy using just the id as a locator. [...]. It is also possible to specify the approach Selenium2Library should take to find an element by specifying a lookup strategy with a locator prefix"

Upvotes: 1

Related Questions