DEV Community

Oscar Sun(孫守真字任真)
Oscar Sun(孫守真字任真)

Posted on

Answer: C# Selenium SendKeys() to element within iFrame

How about pasting to the element:

IWebElement email = driver.FindElement(By.Name("email"));
//email.SendKeys("someemail@input.com");
Clipboard.SetText("someemail@input.com");
email.textbox.SendKeys(OpenQA.Selenium.Keys.LeftShift + OpenQA.Selenium.Keys.Insert);

Top comments (0)