0

I am using SitePrism 2.6 and getting error Cannot use xpath locator strategy from an element. It can only be used from root element.

Defined the section element using xpath.

Section element is of type X, So I have X class in which I have defined child elements using xpath.

ex: section :abc_cell, X, xpath: '//xpath'

Class X < SitePrism::Section

  label :xyz, xpath: '//xpath'

end

When trying to access the page_object.abc_cell.xyz_label getting error:

Cannot use xpath locator strategy from an element. It can only be used from root element.

  • Working with Appium automation framework and getting issue only in android while same thing is working in iOS.

Why is this happening in android?

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1