my id is hidden,how to assign webelement to string with javascript Executor
i have to perform below 2 operation with javascript executor:
String cartCountSearchTab = driver.findElement(By.id(("")).getText().replaceAll(" ", "");
int cartCountTab = Integer.parseInt(cartCountSearchTab);