Q:

Why doesn't WebDriver edit a confluence page?

I'm using Python 3 + Selenium WebDriver (latest version) along with Chrome.
By Confluence, I'm talking about the "wiki-like" confluence page. It has an edit button that I can click successfully using WebDriver.
However, I'm noticing a really odd thing. After I click on edit, the page switches to edit mode. At this point, I would expect WebDriver to find xpaths as it normally does. But it doesn't.
I'm observing that any xpath search after clicking on edit fails. A timeout exception is thrown if I'm waiting for an element to load and if I try clicking on an element then an "Element not found" exception is thrown.
I can open the browser console, elements tab, do a control+F and type in the xpath. And there it works fine. But when I send it using WebDriver, it always fails.
I've even tried keeping a time.sleep(1 minute) just to ensure that the page loads completely before WebDriver attempts a click. But that makes no difference either.
Does anyone know why this is happening and how to enter text into a confluence page by editing it via WebDriver?

A:

Edit area is an embedded page which is located inside an iframe, so to make some edits you need to switch to that frame. I'm not sure that it's the same frame in your case and which programming language exactly you're using, but here is Python version
driver.switch_to.frame(driver.find_element_by_xpath('//iframe[@title="{#aria.rich_text_area}"]'))

Don't forget to switch back after changes made:
driver.switch_to.default_content()

