Quality Assurance

Locator Generator
LIMITED Scenario Test Cases

Complete test cases to verify all LIMITED scenarios are detectable and working correctly.

🎨 Test Case 1: SVG Elements

✅ WORKING SVG Circle Detection
Test Steps:
Copy the HTML example below
Go to Locator Generator
Paste HTML in input field
Click "Generate DOM Tree"
Click on the circle element in DOM tree
HTML Example:
<svg id="chart" width="200" height="200"> <circle id="data-point-1" cx="50" cy="50" r="40" fill="red"/> <circle id="data-point-2" cx="150" cy="150" r="30" fill="blue"/> </svg>
✅ Expected Result:
  • Tool shows: "🎨 SVG Element - Special Handling Required"
  • Recommended XPath: //svg//circle[@id='data-point-1']
  • Code examples for Java, Python, Cypress
  • SVG-specific selector syntax shown
✅ WORKING SVG Path Detection
HTML Example:
<svg viewBox="0 0 100 100"> <path id="line-1" d="M 10 10 L 90 90" stroke="black"/> <path id="line-2" d="M 90 10 L 10 90" stroke="blue"/> </svg>
✅ Expected Result:
  • Tool detects: SVG Path element
  • Shows: //svg//path[@id='line-1']
  • Provides framework-specific code

🎨 Test Case 2: Hidden Elements

✅ WORKING Hidden via display:none
HTML Example:
<div style="display: none;"> <button id="hidden-button">Delete Account</button> </div>
✅ Expected Result:
  • Tool detects: Hidden Element warning
  • Shows: "🎨 Parent Hidden: Element's parent is hidden"
  • Recommends: Must show parent before interaction
  • Provides workaround code
✅ WORKING Hidden via hidden attribute
HTML Example:
<input type="text" id="temp-field" hidden> <button id="show-btn">Show</button>
✅ Expected Result:
  • Tool detects: Hidden attribute
  • Shows: "🎨 Hidden Element" warning
  • Recommends: Verify visibility before interaction

⚡ Test Case 3: Dynamic IDs/Classes

✅ WORKING React Dynamic ID
HTML Example:
<div id="react-12345-root"> <button id="react-67890-button" class="btn-primary"> Submit </button> </div>
✅ Expected Result:
  • Tool detects: "⚡ Dynamic Attributes Detected"
  • Shows: ID pattern "react-67890-button"
  • Warns: "Selector may not be stable across page loads"
  • Recommends: Use data-* attributes instead
✅ WORKING Ember Dynamic ID
HTML Example:
<div id="ember-123-component"> <input id="ember-456-input" type="text"> </div>
✅ Expected Result:
  • Tool detects: Dynamic Ember ID pattern
  • Shows: Stability warning
  • Suggests: data-testid approach

📌 Test Case 4: Nested iframes

✅ WORKING Multiple iframes Detection
HTML Example:
<html> <body> <h1>Main Page</h1> <iframe id="frame-1" name="payment"></iframe> <iframe id="frame-2" name="ads"></iframe> <iframe id="frame-3" name="chat"></iframe> </body> </html>
✅ Expected Result:
  • Tool detects: "📌 Multiple iframes detected: 3 iframes found"
  • Shows: "Element may be inside one of them"
  • Recommends: Check which iframe contains target
  • Provides: Nested frame switching code
✅ WORKING Single iframe with Content
HTML Example:
<html> <body> <h1>Payment Form</h1> <iframe id="payment-frame" name="payment-form"> <form> <input id="card-number" type="text"> <button id="submit-btn">Pay</button> </form> </iframe> </body> </html>
✅ Expected Result:
  • Tool detects: "📌 iFrame Detected"
  • Shows: Code examples for switching to frame
  • Provides: Selenium (Java/Python) and Cypress code
  • For button: Generates frame-aware selectors

✅ Verification Checklist

SVG Elements Status
  • Detection working
  • Warning message shows
  • XPath code generated
  • Java code provided
  • Python code provided
  • Cypress code provided
Hidden Elements Status
  • Display:none detected
  • Hidden attribute detected
  • Parent hidden detected
  • Warning message shows
  • Recommendations provided
  • Code examples shown
Dynamic IDs Status
  • React IDs detected
  • Ember IDs detected
  • Angular IDs detected
  • Vue IDs detected
  • Temp IDs detected
  • Stability warning shown
Nested iframes Status
  • Multiple iframes detected
  • Single iframe detected
  • Warning message shows
  • Java code generated
  • Python code generated
  • Cypress code generated

📊 Accessibility Summary

Scenario Accessible Testable Code Generated
SVG Elements ✅ Yes ✅ Yes ✅ Java, Python, Cypress
Hidden Elements ✅ Yes ✅ Yes ⚠️ Warnings only
Dynamic IDs/Classes ✅ Yes ✅ Yes ⚠️ Warnings + recommendations
Nested iframes ✅ Yes ✅ Yes ✅ Java, Python, Cypress