Handling Dynamic Locators
akshayp7 opened this issue · comments
How to handle Dynamic locators??
For E.g //input[contains(text()='sometext')] where sometext must be replaced by a certain value.
As in Site prism it returns CapybaraNodeElements, should I define these kind of xpaths as string in Locators section?
If you want something dynamic then you'd need to define the dynamic value before runtime.
SitePrism metaprograms in the values at runtime. So you need the values before runtime.
If you want to define the values POST runtime, you would need to run the class methods for the DSL creation. However you're very much on your own if you do this.