IFrame in webdriver. Typing in RTE
问题 I have a Rich Text Editor on my page, and some text needed to be typed in there. I wrote a solution but it seems to only work intermittently. Here is what I've already tried: var iframe = _driver.SwitchTo().Frame(Driver.FindElement(By.XPath(xpath))); var editor = iframe.FindElement(By.XPath("//*")); for (var i = 1; _driver.FindElement(By.XPath("//*")).Text == String.Empty; i++) { switch (i) { case 1: editor.SendKeys(text); break; case 2: editor.SendKeys(Keys.Control + "a"); editor.SendKeys