Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

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 a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post