dequelabs / axe-core-maven-html

Tools for using axe for web accessibility testing with JUnit, Selenium, and Playwright

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Axe unable to proceed for elements located in frame

sswapnika opened this issue · comments

Product: <<axe-core | axe Extension | axe Linter>>

Expectation: Axe should work for elements that are in frame

Actual: Either element not found exception is thrown or stale element exception

Additional information:
Browser: Chrome
Axe Version: 4.3.1
Platform: Windows

Following is the code which I have used

AxeBuilder builder = new AxeBuilder();
System.out.println("Entered Accessibility");
Results results = builder.setTimeout(200).analyze(driver());
List violations = results.getViolations();
if (violations.size() == 0) {
Assert.assertTrue(true, "No violations found");
} else {
File accessibilityReportPath = new File(
System.getProperty("user.dir") + "\target\accessibility-reports");
accessibilityReportPath.mkdir();
AxeReporter.writeResultsToJsonFile(accessibilityReportPath + File.separator + scenario.getName(),
results);
if (AxeReporter.getReadableAxeResults(ResultType.Violations.getKey(), driver(),
violations)) {

Following is the exception thrown

[ERROR] RunCukesTest.runScenario Time elapsed: 578.217 s <<< FAILURE!
com.pega.exceptions.PegaElementNotFoundException:
no such element: Unable to locate element: {"method":"xpath","selector":"//button[contains(@data-click,'Save') and @accesskey='S'][not(.//ancestor::div[contains(@Style,'none')])]|//button[text()='Save']|//div[text()='Save']"}
(Session info: chrome=94.0.4606.54)
For documentation on this error, please visit: https://www.seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'L38117WIN', ip: '10.150.214.181', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_301'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 94.0.4606.54, chrome: {chromedriverVersion: 94.0.4606.61 (418b78f5838ed..., userDataDir: C:\Users\somis2\AppData\Loc...}, goog:chromeOptions: {debuggerAddress: localhost:55083}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: eb286b85fb6ce1db069a40dd40c4be03
*** Element info: {Using=xpath, value=//button[contains(@data-click,'Save') and @accesskey='S'][not(.//ancestor::div[contains(@Style,'none')])]|//button[text()='Save']|//div[text()='Save']}
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'L38117WIN', ip: '10.150.214.181', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_301'
Driver info: driver.version: unknown
at com.pega.framework.WaitHandlerImpl.waitForElementPresence(WaitHandlerImpl.java:217)
at com.pega.framework.WaitHandlerImpl.waitForElementPresence(WaitHandlerImpl.java:206)
at com.pega.framework.elmt.FrameImpl.findElement(FrameImpl.java:194)
at com.pega.framework.elmt.FrameImpl.findElement(FrameImpl.java:121)
at com.pega.ri.RuleInstanceImpl.save(RuleInstanceImpl.java:152

commented

Closing due to inactivity, please re-open is issue is apparent in version: 4.4.1