Im using selenium-java 4.6.0 and Im capturing network traffic.When I try to import the selenium class for 'Network', I get several options :
-org.openqa.selenium.devtools.v107.network.Network; -org.openqa.selenium.devtools.v106.network.Network; -etc...
Is there a way to select always the last version available? Or another way to not to change with each new release the import version?
CodePudding user response:
Hmm I think you can do this by specifying a specific import in class:
import org.openqa.selenium.devtools.v85.network.Network;
With one version import it's no way that it take some other version.
CodePudding user response:
I had the exact same question a while back. Here is the answer I got back from Jim Evans (one of the Selenium developers):
those will change with every release. If you choose to use the raw DevTool protocol API, you’re tying yourself to a specific version of Chrome. This is the same reason that CDP-based automation libraries like Puppeteer tie their releases to specific versions of Chrome. Selenium provides version-agnostic APIs for common things that many people want to use CDP for, like network request/response interception and manipulation. If you find those APIs lacking, it would be instructive to know your use case, and how common it is.