/*
 * Copyright (c) 2018, 2026, Oracle and/or its affiliates.
 * Licensed under The Universal Permissive License (UPL), Version 1.0
 * as shown at https://oss.oracle.com/licenses/upl/
 */
const RULENAME="wd-xpath";const DESCRIPT="Do not locate elements by xpath - targeted elements should have static Ids. Use By.id() instead";const SHORT="Do not locate elements by xpath";function Rule(){};Rule.prototype.getName=function(){return RULENAME};Rule.prototype.getShortDescription=function(){return SHORT};Rule.prototype.getDescription=function(){return DESCRIPT};Rule.prototype.register=function(){return{CallExpression:this._onCallExpr}};Rule.prototype._onCallExpr=function(ruleCtx,node){var cn=node.callee;if(cn&&cn.property&&cn.property.type==="Identifier"&&cn.property.name==="xpath"){let issue=new ruleCtx.Issue(DESCRIPT);ruleCtx.reporter.addIssue(issue,ruleCtx)}};module.exports=Rule;