Open sswapnika opened 3 years ago
Thanks for the issue. I'm curious if the latest version would fix the issue for you. We've done a lot of work in 4.3 to make iframe testing more robust.
Hi, We observed the same issue with 4.3.1. I observed it failed to find a button within a Frame and also to select an option from dropdown list within a frame
Thanks for checking that for us. I'll pass this along to our java developer and he'll take a look at it.
Hi @sswapnika. I'm not familiar with Pega, but the exception seems to imply that the failure stems from it. Can you test your site with vanilla Selenium and report any exceptions that occur?
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.2.2 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
Motivation: << Describe why you want the behavior to be changed >>
Product: <<axe-core | axe Extension | axe Linter>>
Expectation: << Describe what you expect the product to do >>
Actual: << Describe what the product actually does >>
Motivation: << Describe why you want the behavior to be changed >>