Selenium sendKeys are not sending all characters

前端 未结 7 1701
面向向阳花
面向向阳花 2021-02-02 15:29

I\'m using Java, Selenium, and Chrome for test automation. Our developers recently upgraded our UI from AngularJS to Angular2 (not sure if that matters). But since then, sendKey

7条回答
  •  一整个雨季
    2021-02-02 16:29

    try this code.. other way to set values using javascript WebDriver driver = new FirefoxDriver(); JavascriptExecutor jse = (JavascriptExecutor)driver; jse.executeScript("document.getElementsByName('body')[0].setAttribute('type', 'text');"); driver.findElement(By.xpath("//input[@name='body']")).clear(); driver.findElement(By.xpath("//input[@name='body']")).sendKeys("Ripon: body text");

提交回复
热议问题