You should be able to use JavaScript to make these things.

For example, I have this select list on my page:
<select name="menu">
        <option value="0" selected>0</option>
        <option value="1">one</option>
</select>

Now, in Watir I could do something like this with JavaScript:
script = %q {
                         opt=document.createElement('option');
                         opt.text='malicious';
                         opt.value='666';
                         list=document.getElementsByName('menu')[0];
                         list.add(opt);
}

$browser.ie.document.parentWindow.execScript(script)
$browser.select_list(:name, "menu").select "malicious"
$browser.form(:index, 1).submit

This only works with IE though.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to