Hi Chuck,
I have tried a wait and it works sometime and others times it doesn't.
Actually the html I provide is just section within the list that has the
text field and button stuff. I really don't need the
'li(:id,'add-new-comment').' which I will be removing soon.
I create a random string of characters using the following:
v = rand(125)
rt = ""
for tr in 0..v
#get character value
th_pick = (rand(26)+97).chr
#place in a string
rt << "#{th_pick},"
end # End #Loop selecting random characters
puts rt
I think when I go to set the field with the long string the click event is
lost and the buttons disappear. I think if I type each individual
character one at time which keeps watir and the field constantly
interacting. How can I do that since the 'set' method over write the
previous character? I know QTP has a type method is there one for Watir?
Joe
On Wed, Nov 2, 2011 at 4:21 PM, Chuck van der Linden <[email protected]>wrote:
> On Nov 2, 10:42 am, Joe Fleck <[email protected]> wrote:
> > Here is the Html:
> >
> > <div>
> > <input id="comments_presenter_resource_name" class="resource-name" type="
> > hidden" value="SimpleDiscussion"
> name="comments_presenter[resource_name]">
> > <input id="comments_presenter_initial_comments_count" class="
> > initial-comments-count" type="hidden" value="5" name="
> > comments_presenter[initial_comments_count]">
> > <input id="comments_presenter_all_comments_count"
> class="all-comments-count"
> > type="hidden" value="1" name="comments_presenter[all_comments_count]">
> > <input id="comments_presenter_owner_ids" class="owner-ids" type="hidden"
> > name="comments_presenter[owner_ids]">
> > <label for="simple_discussion_comments_presenter_17" style="display:
> none;">Add
> > your comment...</label>
> > <textarea id="simple_discussion_comments_presenter_17"
> class="comment-form
> > clearfix blurred" rows="75" name="comments_presenter[content]" cols="20"
> > style="height: 17px; overflow: hidden;"></textarea>
> > <ul class="buttons" style="display: none;">
> > <div style="position: absolute; display: none; font-weight: 400; width:
> > 589.5px; font-family: arial,helvetica,clean,sans-serif; line-height:
> > 13.35px; font-size: 10.8833px; padding: 6px 2px;">Add your
> comment...
> > </div>
> > </div>
>
> Are you sure that is the proper HTML? your code is clicking on a list
> item, and I see no list item <li> tag anywhere in that.
>
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]