开发者

Watir Checkbox marking slow with Firefox on Linux

开发者 https://www.devze.com 2023-03-09 17:28 出处:网络
I am running Watir on a Linux machine for testing with Firefox 3.6. I have observed that marking multiple checkboxes is quite slow. I have implemented the fix for a related problem with text boxes, us

I am running Watir on a Linux machine for testing with Firefox 3.6. I have observed that marking multiple checkboxes is quite slow. I have implemented the fix for a related problem with text boxes, using .value instead of .set. See Firewatir Textfield Set Very Slow

However, I cannot find a way to speed up checkboxes. There is no value method for checkboxes. The second solution for text boxes that alters the event handlers is intriguing. My question is how do I find the right file to edit for Ruby 1.9.2 and Firewatir, and what would I chang开发者_开发问答e? Thanks.

Ruby code:

checkBoxFlag = false
prevBlogCountLabel = @browser.span(:class, 'linksnumber').text
begin
   @browser.checkbox(:value, blogid).set(set_or_clear=true)
   checkBoxFlag = true
rescue
   # unable to check box - does not exist
   checkBoxFlag = false
end

And here is the relevant HTML snippet:

<table id="bloglist">
<tbody>
<tr class="odd">
<td>
<input class="shiftselect" type="checkbox" value="966393" name="id[]">
</td>


Try "value" instead of "set" function value("checked") maybe

0

精彩评论

暂无评论...
验证码 换一张
取 消