title: Adding javascript executor code to string shows error
body: <pre><code>WebElement element = driver.findElement(By.id(pro.getProperty("")));
  JavascriptExecutor jse = (JavascriptExecutor)driver;
  jse.executeScript("return arguments[0].text", element);
  
  String cartCountSearchTab = ((String) ((JavascriptExecutor)driver).executeScript("returnarguments[0].text;",driver.findElement(By.id(pro.getProperty(""))))).replaceAll(" ", "");
  
  int cartCountTab = Integer.parseInt(cartCountSearchTab);
  </code></pre>
  
  <p>This above code throws a null pointer exception.</p>