I want to scrape the price out of a website to compare the price between my website The data exported out was in form $XXX.XXX and I want it in a pure number like XXXXXX. Here is my code:
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class scrape {
    public static void main(String[] args) {
        System.setProperty("webdriver.chrome.driver","...driver\\chromedriver.exe");
        ChromeDriver driver = new ChromeDriver();
        driver.manage().window().maximize();
        driver.get("...");
        WebElement price = driver.findElement(By.xpath("//p[contains(@class, 'box-price-present')]"));
        System.out.println("price: "+price.getText());
        driver.quit();
}}
The exported data was in text form and I want it in pure number form.
 
     
    