When using Java and Selenium, frequently when I google how to change a certain behaviour I find some example that explains how to change a setting using either addArgument or set_preferences, something like this:
options.addArguments("dom.webdriver.enabled=False");
options.addArguments("useAutomationExtension=False");
profile.setPreference("dom.webdriver.enabled", False);
profile.setPreference("useAutomationExtension", False);
Looking at the Javadoc isn't very helful:
Could someone explain the relation between these? Any conceptual differences? They seem very overlapping.
Furthermore, there is desiredCapabilities
and capabilities
that also seems very similar. Why do these exist and how do they relate to each other?