How do I select elements inside an iframe with Xpath?
You cannot traverse through <iframe>
's until switching to them. Your xPath,
//iframe[@name='editor_body']//body[@contenteditable='true']
will not work because the <body>
tag is within an iFrame, which is not in the current context. you need to switch to it first:
driver.switch_to.frame('editor_body')...