I am trying to use the url of a webpage that I navigated onto using Selenium, to access the webpage using Jsoup.
However, when I try to do so, I receive the following message in the console: "WARNING: Unable to find version of CDP to use for . You may need to include a dependency on a specific version of the CDP using something similar to org.seleniumhq.selenium:selenium-devtools-v86:4.0.0
where the version ("v86") matches the version of the chromium-based browser you're using and the version number of the artifact is the same as Selenium's."
I am not sure what I am doing wrong, or of another way to go about achieving this.
System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir").concat("\\chromedriver" + ".exe"));
WebDriver driver = new ChromeDriver();
driver.get("https://www.chapters.indigo.ca/en-ca/");
WebElement webElement = driver.findElement(By.id("header__quick-search"));
webElement.sendKeys("9780385697378");
webElement.submit();
driver.findElement(By.className("product-list__product-title")).click();
String url = driver.getCurrentUrl();
final Document document = Jsoup.connect(url).get();