According to the shared HTML the table column is within the <span> , which is inside several <div> tags. Therefore, we need to build a unique xpath to identify the WebElement and send clear() , then use sendKeys() as follows:
driver.findElement(By.xpath("//div[@id='element']/div[@class='class_name']/div[@class='class_name']/div[@class='class_name']/span[text()='5000']")).clear(); driver.findElement(By.xpath("//div[@id='element']/div[@class='class_name']/div[@class='class_name']/div[@class='class_name']/span[text()='5000']")).sendKeys("15000");
Update
As you mentioned Text which was passed in the span is not predictable , we just omit the sentence [text()='5000'] . Since you provided an HTML sample with a sample classnames , I built an almost absolute xpath . So our code will be:
driver.findElement(By.xpath("//div[@id='element']/div[@class='class_name']/div[@class='class_name']/div[@class='class_name']/span")).clear(); driver.findElement(By.xpath("//div[@id='element']/div[@class='class_name']/div[@class='class_name']/div[@class='class_name']/span")).sendKeys("15000");
source share