A Roslyn Analyzer for detecting duplicate XPath functions in the same class of the form "Locator(yourXpath);".
License
—
Deps
0
Install Size
—
Vulns
✓ 0
Published
Feb 12, 2026
$ dotnet add package XPathDuplicateAnalyzerA Roslyn Analyzer for detecting duplicate XPath functions in the same file of the form "PageDriver.RequestElement(yourXpath);".
Simply install the package from NuGet and it will automatically start analyzing your code.
This analyzer is built for C# projects using the Roslyn compiler. It uses the Roslyn API to analyze the syntax tree of your code and uses .Net Standard 2.0.
public UIElement BtnSubTreshold00() => PageDriver.RequestElement("//div[@name='uxThresholdFormat001SubmitButton']");
public UIElement TxtCurrTreshPerc00() => PageDriver.RequestElement("//input[@name='uxThresholdFormat001TextBox']");
These two lines of code are considered duplicates because they both use the same XPath "//div[@name='uxThresholdFormat001SubmitButton']".