You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: invalid selector: Unable to locate an element with the xpath expression sequence number because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string 'sequence number' is not a valid XPath expression.". The issue occurs when attempting to write to a table using an xpath.
Element.java
/**
* Returns the stored XPath for this element.
* Returns null if no XPath exists in the page object.
*
* @return the xPath for the element listed in the page object
*/
public By xPathToBy() {
return By.xpath(selectors.get(SelectorType.XPATH));
}
/**
* Returns the stored XPath for this element modified to pull the nth instance of the element
* by using the passing ordinal value (passed as an int).
*
* @param ordinal int the instance of the element we want to retrieve
* @return the xPath for the element listed in the page object for the nth instance (ordinal)
*/
public By xPathToBy(int ordinal) {
return By.xpath(SentinelStringUtils.format("({})[{}]", selectors.get(SelectorType.XPATH), ordinal));
}
The text was updated successfully, but these errors were encountered:
Error: invalid selector: Unable to locate an element with the xpath expression sequence number because of the following error:
SyntaxError: Failed to execute 'evaluate' on 'Document': The string 'sequence number' is not a valid XPath expression.". The issue occurs when attempting to write to a table using an xpath.
Element.java
/**
* Returns the stored XPath for this element.
* Returns null if no XPath exists in the page object.
*
* @return the xPath for the element listed in the page object
*/
public By xPathToBy() {
return By.xpath(selectors.get(SelectorType.XPATH));
}
The text was updated successfully, but these errors were encountered: