Quantcast
Viewing all articles
Browse latest Browse all 55

Getting "no such element: Unable to locate element", On trying to click the webElement which is present inside the iframe. But switched to frame done

I wanna to edit the "max" number editbox in this url which is present inside the iframe. I have successfully switched to that frame and can able to access other element. But access that "max" element to perform click/sendkeys operation on it.

driver.get("https://www.random.org/");driver.switchTo().frame(0);                 Thread.sleep(2000);// Getting "No such Element for below element in an iframe"WebElement max = driver.findElement(By.id("bwsekhhlzrbtobdigvhwbhwdmugydupfpgkorlni-max"));max.click();max.clear();max.sendKeys("1000000");//But I can able to access the below element which is also an iframe elementdriver.findElement(By.cssSelector("input[value='Generate']")).click();

Viewing all articles
Browse latest Browse all 55

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>