-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty tab is opened and closed in browser in the analyzePost43x private method of AxeBuilder.java class #391
Comments
@tvtester This is intentional. As of axe-core 4.3 a number of operations are run in an isolated context. That's what the blank frame is for. This is to improve integrity and security of the results. Are you experiencing any difficulties because of this change? We've attempted to do this in a way that was unlikely to impact the environment, although admittedly this does have some impact on performance. |
For Safari Browser I am getting the below error , however for Chrome, FF and Edge there is not issue at all.
|
@rshidling Interesting. Does the error happen on a specific url, or does the error always happen for any url? If it's a specific url, are you able to share the url? |
I am facing this same issue. @straker PFA code. I am using selenium latest version ad axe dependency also latest version. Code:package Accessibility_AXECore;
import java.io.IOException;
import javax.naming.OperationNotSupportedException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import com.deque.html.axecore.extensions.WebDriverExtensions;
import com.deque.html.axecore.results.Results;
import com.deque.html.axecore.selenium.AxeBuilder;
public class ChromeTestAccessibility {
public static void main(String args[]) throws OperationNotSupportedException, IOException {
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.co.in");
// Results results = WebDriverExtensions.analyze(driver);
Results results = new AxeBuilder().analyze(driver);
System.out.println(results.toString());
driver.quit();
}
} Error i am facing:SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". Maven dependencies that i have
|
Do we have any update on this ? Are we planning any fix ? |
I occasionally run into the same NoSuchWindowException when testing on Safari. It seems rather sporadic. |
@pankaj-sukale @benken-parasoft are both of you also experiencing this using one of the axe-core-maven pacakges? If so I may move this issue to that repository for better tracking. |
I am using the "com.deque.html.axe-core:selenium" Maven Java library. import org.openqa.selenium.WebDriver;
import com.deque.html.axecore.results.Results;
import com.deque.html.axecore.selenium.AxeBuilder;
...
static Results analyze(AxeBuilder builder, WebDriver webDriver) {
try {
return builder.analyze(webDriver);
} catch (NoSuchWindowException e) {
// retry if NoSuchWindowException is thrown
// see issue https://github.com/dequelabs/axe-core-maven-html/issues/391
return builder.analyze(webDriver);
}
} I only run into this issue on Safari on macOS where the NoSuchWindowException happens a bit randomly. I also test with Chrome, Edge, and Firefox on Linux, macOS, and Windows but never see the issue in those environments. |
Thanks for the info. I'm going to port this issue to axe-core-maven repository as it looks like it's a Java issue, and more specifically could be a Safari and MacOs issue. |
We've identified the issue and will work on getting a fix in place that works for our supported versions of Selenium. Until then you can mitigate this issue by using setLegacyMode(true) before analyzing. Just note that legacy mode is deprecated and will be removed in v5.0. |
Verified with the latest QA-Build (4.8.1-SNAPSHOT/4.8.1-20240109.201525-1) , With Code tested:
Environment:
|
Following method is opening empty tab in the browser at the code:
String prevWindow = WebDriverExtensions.openAboutBlank(webDriver);
andWebDriverExtensions.closeAboutBlank(webDriver, prevWindow);
`private Results analyzePost43x(final WebDriver webDriver, final Object rawContextArg) {
String rawOptionsArg = getOptions().equals("{}")
? AxeReporter.serialize(runOptions) : getOptions();
}`
Product:
Expectation: Empty or additional tab should not be open in the browser
Actual: Driver is opening empty tab and close it, though there is no need of it
Motivation:
The text was updated successfully, but these errors were encountered: