I am trying to test our application which is in Angular. I wanted to know what is the difference between.
WebElement stateSelect = driver.findElement(By.id("name")); stateSelect.sendKeys("Testing Angular");
and
WebElement stateSelect = driver.findElement(By.id("name")); ((JavascriptExecutor) driver).executeScript("arguments[0].value='testing angular interpolation';arguments[0].click()", stateSelect);
When i am testing with sendKeys interpolation on the particular webElement works, i.e it shows the updated value on interpolation while if i do the latter updating the value and try interpolation on that particular value it doesn't work. I would like to know how i could achieve sendKeys functionality using executeScript.