Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to select font node in Sahi?
    primarykey
    data
    text
    <p>I am using Sahi to record my actions in IE8. My page contains this markup:</p> <pre><code>&lt;td id="ButtonText" class="myClass"&gt; &lt;font title="unique title" onclick="CallThis()"&gt;ButtonText&lt;/font&gt; &lt;/td&gt; </code></pre> <p>When I click the button defined above, Sahi records:</p> <pre><code>_click(_cell("Button Text")); </code></pre> <p>But when I play this back, the button is not clicked. However,</p> <pre><code>_assertExists(_cell("Button Text")); </code></pre> <p>returns true.</p> <p>I have added the following line into the concat.js file to try to make it detect font nodes:</p> <pre><code>this.addAD({tag: "FONT", type: "null", event:"click", name: "_font", attributes: ["sahiText", "title|alt", "id", "index", "href", "className"], action: "_click", value: "sahiText"}); </code></pre> <p>but this doesn't seem to have had any effect (I have restarted Sahi). I don't have any control over the page being tested and I am not sure whether the td node or the font node is being selected. </p> <p>How do I fire the onclick event of the font node?</p> <p>EDIT: I have added _font to sahi/config/normal_functions.txt</p> <p>Manually tweaking the page using IE tools to have the onclick even on the td results in the same steps being recorded, but it will now play it back.</p> <pre><code>&lt;td id="ButtonText" class="myClass" onclick="CallThis()"&gt; &lt;font title="unique title"&gt;ButtonText&lt;/font&gt; &lt;/td&gt; </code></pre> <p>Unfortunately I am unable to make any changes to the page and I still need to playback the onclick event which exists on the font node. </p> <p>Both </p> <pre><code>_font("ButtonText"); _font("unique title"); </code></pre> <p>give </p> <blockquote> <p>[Exception] [object Error]</p> </blockquote>
    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.
 

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