Webdriver script to write scrap automation script?
package scs;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
import java.io.*;
public class SearchRoom {
public static void main(String[] args) throws IOException {
System.setProperty("webdriver.chrome.driver", "c://chromedriver.exe");
WebDriver scs= new ChromeDriver();
scs.get("https://shivaconceptsolution.com/test.html");
//System.out.println(scs.getCurrentUrl());
//System.out.print(scs.getPageSource());
FileWriter f = new FileWriter("d://scrap.txt");
BufferedWriter bw = new BufferedWriter(f);
bw.write(scs.getPageSource());
bw.close();
}
}
POST Answer of Questions and ASK to Doubt