From 0417d9ef0094988c4af2a53be3c07a27aa18dc3e Mon Sep 17 00:00:00 2001 From: bvn13 Date: Mon, 4 May 2020 18:05:39 +0300 Subject: [PATCH] fix bug --- .../StopcoronovirusRfSeleniumDataRetriever.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/covid19-scheduler/src/main/java/com/bvn13/covid19/scheduler/updater/stopcoronovirusrf/StopcoronovirusRfSeleniumDataRetriever.java b/covid19-scheduler/src/main/java/com/bvn13/covid19/scheduler/updater/stopcoronovirusrf/StopcoronovirusRfSeleniumDataRetriever.java index bcf8baa..75c64df 100644 --- a/covid19-scheduler/src/main/java/com/bvn13/covid19/scheduler/updater/stopcoronovirusrf/StopcoronovirusRfSeleniumDataRetriever.java +++ b/covid19-scheduler/src/main/java/com/bvn13/covid19/scheduler/updater/stopcoronovirusrf/StopcoronovirusRfSeleniumDataRetriever.java @@ -71,10 +71,10 @@ public class StopcoronovirusRfSeleniumDataRetriever implements StopcoronovirusRf for (WebElement row : tableData) { RowData rowData = RowData.builder() - .region(row.findElement(By.cssSelector("th")).getAttribute("innerText")) - .sick(row.findElement(By.cssSelector("td.col-sick")).getAttribute("innerText")) - .healed(row.findElement(By.cssSelector("td.col-healed")).getAttribute("innerText")) - .died(row.findElement(By.cssSelector("td.col-died")).getAttribute("innerText")) + .region(row.findElement(By.cssSelector("th")).getAttribute("innerText").trim()) + .sick(row.findElement(By.cssSelector("td.col-sick")).getAttribute("innerText").trim()) + .healed(row.findElement(By.cssSelector("td.col-healed")).getAttribute("innerText").trim()) + .died(row.findElement(By.cssSelector("td.col-died")).getAttribute("innerText").trim()) .build(); Assert.isTrue(StringUtils.isNotBlank(rowData.getRegion()), "Broken data found after " + rows.size() + " rows"); rows.add(rowData);