I tried to implement the solution provided here:
Java how to manipulate a html text element with dynamic generated name?
It worked but when I did inspect element the HTML was as is, no change was made to the page. It didn't give any error.
This is what I tried:
gotoPage("https://www.demo.com/in/");
Document doc = Jsoup.connect("https://www.demo.com/in/").get();
System.out.println("Before "+doc.select("#top-menu > div > div.nav-logo > a").first());
Element e = doc.select("#top-menu > div > div.nav-logo > a").first();
e.attr("href", "https://demo-custom-page.net/demo/test-jsoup.html");
System.out.println("After "+doc.select("#top-menu > div > div.nav-logo > a").first());
Thread.sleep(120000); // inspect element and if html changed or not
I am working on Windows 7, Java, Selenium, Maven