Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's just no way you'll force Selenium to type into a hidden element.</p> <p>Would this work? It uses Javascript's <a href="https://developer.mozilla.org/en/DOM/document.evaluate" rel="nofollow"><code>document.evaluate()</code></a> to find the element by XPath and then types directly into the found element's <code>value</code>.</p> <pre><code>selenium.GetEval( "var xpath = '//XPath/to/your/element';" + "var text = 'some text to input into the element'" + "var elem = window.document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);" + "elem.singleNodeValue.value = text;" ); </code></pre> <p>If not, try to run it in FireBug and post the result (or error) here.</p> <hr> <p>The next thing to try would be to try to make the element visible...</p> <hr> <h2>EDIT - the above won't work</h2> <p>You have like all the problems in one place :)</p> <ol> <li>An <code>iframe</code>. You must <a href="http://selenium.googlecode.com/svn/trunk/docs/api/dotnet/html/M_Selenium_ISelenium_SelectFrame.htm" rel="nofollow">select it</a> before trying to interact with anything inside.</li> <li>If the <code>iframe</code> loads anything from a different domain, then the <a href="http://seleniumhq.org/docs/05_selenium_rc.html#the-same-origin-policy" rel="nofollow">Same origin policy</a> for JavaScript kicks in. And since Selenium RC is written in pure JavaScript, it can't do anything. You can either switch to <code>WebDriver</code> which doesn't suffer from this, or try to reopen the browser on the internal address of the <code>iframe</code>. Might not work, though.</li> <li>The <code>body</code> tag in the <code>iframe</code> is <code>contenteditable</code> which is a problem <a href="http://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q%3a_How_do_I_type_into_a_contentEditable_iframe?" rel="nofollow">solved by <code>WebDriver</code></a>. Selenium RC should be able to <code>type()</code> into it just as well.</li> <li>An invisible <code>textarea</code>. That's your last problem. If you really needed to write into it (there's the editable <code>body</code>), you you'll have to use JavaScript, because Selenium RC refuses to work with invisible elements.</li> </ol>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload