-2

How to get the text value which is not present in HTML dom, but present in UI.text box present in UI

html tag for that element or angular

mahan
  • 12,366
  • 5
  • 48
  • 83

1 Answers1

0

Wherever it is, you can get it with input.getAttribute("value"). You just need to select the input.

WebElement input = driver.findElement(By.tagName("app-datepicker"))
                         .findElement(By.tagName("input"));
String value = input.getAttribute("value");

I do so. app-datepicker is an AngularJS component.

mahan
  • 12,366
  • 5
  • 48
  • 83
  • tried this: but returning a null value driver.findElementByXPath("//div[contains(@class,'form_input_Trader') and contains(@class,'form_meridian_date')]/input").getAttribute("value"); – bhargav porapu Jun 08 '18 at 10:32