Reason : if object hidden, then webdriven unable to enter the text. so we need to enable the text by using javascriptexecutor, then will enter the script
Solution :
WebDriver driver = new FirefoxDriver();
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("document.getElementById('mini-7').setAttribute('type', 'text');");
driver.findElement(By.cssSelector("#mini-7 > input.mini-textbox-input")).clear();
driver.findElement(By.cssSelector("#mini-7 > input.mini-textbox-input")).sendKeys("yy");
This article was exactly what I needed—thank you so much!The leaderboard is calling my name—gotta keep clicking! Join the challenge spacebar clicker
ReplyDelete