Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Can you show us the complete html and js ?</p> <p>Here's a test code I've run with success. Does it match what you're trying to do ?</p> <p>The HTML :</p> <pre><code>&lt;html&gt; &lt;body&gt; &lt;script&gt; function insert(){ var container = document.getElementById("container") var newdiv = document.createElement('div'); newdiv.setAttribute('id','menu_item_0'); newdiv.innerHTML = 'Added the element'; newdiv.onmouseover = function(){ newdiv.innerHTML = 'I feel tickled'; } newdiv.onclick = function() { newdiv.innerHTML = 'I feel clicked'; } container.appendChild(newdiv); } setTimeout(insert,2000); &lt;/script&gt; &lt;div id="container"&gt;&lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And the selenium test (just save this in a .html file and open it from Selenium IDE) :</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt; &lt;head profile="http://selenium-ide.openqa.org/profiles/test-case"&gt; &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt; &lt;link rel="selenium.base" href="file:///G:/dev/proj/test-selenium-ide/" /&gt; &lt;title&gt;test1&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;table cellpadding="1" cellspacing="1" border="1"&gt; &lt;thead&gt; &lt;tr&gt;&lt;td rowspan="1" colspan="3"&gt;test1&lt;/td&gt;&lt;/tr&gt; &lt;/thead&gt;&lt;tbody&gt; &lt;tr&gt; &lt;td&gt;open&lt;/td&gt; &lt;td&gt;index.html&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;waitForElementPresent&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;2500&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertElementPresent&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;mouseOver&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertText&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;I feel tickled&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;clickAt&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;assertText&lt;/td&gt; &lt;td&gt;menu_item_0&lt;/td&gt; &lt;td&gt;I feel clicked&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    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