Unable to enter text to input type on Webpage using Selenium Java

前端 未结 3 1619
无人及你
无人及你 2021-01-28 16:54

Uploaded my entire webpage on which my test is failing here: https://drive.google.com/file/d/1WHcwpQFi5Cxh1q1MupQEuSPk6CPZs2GC/view?usp=sharing

Below is my Selenium Java

3条回答
  •  攒了一身酷
    2021-01-28 17:38

    I have been trying past 24 hours to get this to work and finally did.

    Before, I trigger the Search Assests button as visible in my video @ 1.11 minutes I tried the below code which worked.

    WebElement ele = driver.findElement(By.id("crtestrequest-cr_app_code"));
    JavascriptExecutor exec = (JavascriptExecutor)driver;
    exec.executeScript("arguments[0].click();", ele);
    driver.findElement(By.id("crtestrequest-cr_app_code")).clear();
    driver.findElement(By.id("crtestrequest-cr_app_code")).sendKeys("Allocation");
    

提交回复
热议问题