I have a lot of similar buttons to make Helium click. The usual strategy (create kind + in action "navigate & simulate click") is not working here.
I have taken the liberty to copy and adapt below the same html code problem that was encoutered on another software forum (http://translate.google.com/translate?s ... 2F&act=url) :
There is a page on which the top of the login dialogue is present, the code for the button looks like this:
Code: Select all
<tr>
<td align="left" style="vertical-align: top;">
<div id="button" class="gwt-PushButton gwt-PushButton-up" tabindex="0" role="button" aria-pressed="false">
<input type="text" tabindex="-1" style="opacity: 0; height: 1px; width: 1px; z-index: -1; overflow: hidden; position: absolute;">
<div class="html-face" style="background-color: transparent;"> Login </ div>
</ Div>
</ Td>
</ Tr>
When the cursor pointing at it, the line changes:
Code: Select all
<div id="button" class="gwt-PushButton gwt-PushButton-up-hovering" tabindex="0" role="button" aria-pressed="false">
When you press a button, without releasing the mouse button, the code changes:
Code: Select all
<div id="button" class="gwt-PushButton gwt-PushButton-down-hovering" tabindex="0" role="button" aria-pressed="true">
up => down
and
false => true
I have use a Text gatherer to make the html change ok (I named it "JS_changes") :
Code: Select all
var step0_result = element.outerHTML.replace(/\r\n/g, "\n");
var step1_result = step0_result.replace(new RegExp("aria-pressed=false", "g"), "aria-pressed=true");
var step2_result = step1_result.replace(new RegExp("gwt-PushButton\\ gwt-PushButton-up", "g"), "gwt-PushButton gwt-PushButton-down");
return step2_result;
In action I added the following :
select kind with the log in button
javascript code:
Code: Select all
var dropDown = Global.Browser.Selection.GetItem(0);
window.location.href = Global.Gather("JS_changes", dropDown);
The result was a list of commands:
mouseOver / / * [@ id = "button"]
mouseDown / / * [@ id = "button"]
mouseUp / / * [@ id = "button"]
or
selenium. mouseOver ("locator");
selenium.click ("locator");
Many thanks in advance