Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
First visible input after a label
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Karl Baum  
View profile  
 More options Nov 12 2011, 9:47 pm
From: Karl Baum <karl.b...@gmail.com>
Date: Sat, 12 Nov 2011 21:47:16 -0500
Local: Sat, Nov 12 2011 9:47 pm
Subject: First visible input after a label
I am using an autocomplete library which hides the labeled input field and takes the input instead from a visible autocomplete widget.  When I try to access the field with the label "Select a client" I get an error saying "Element is not currently visible and so may not be interacted with".  This makes sense but I am struggling to figure out how to use capybara to locate the autocomplete input box which is basically the first visible input field after the label.

Any ideas?

thx!

-karl

<div class="input select optional">
  <label for="tour_book_space_tour_book_attributes_client_id" class="select optional"> Select a client</label>
  <select name="tour_book_space[tour_book_attributes][client_id]" id="tour_book_space_tour_book_attributes_client_id" class="select optional" style="display: none;">
    <option value="">New client</option>
    <option value="13">Leexo</option>
    <option value="14">Eimbee</option>
  </select>
  <input class="ui-autocomplete-input ui-widget ui-widget-content ui-corner-left" autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true">
  <button type="button" tabindex="-1" title="Show All Items" class="ui-button ui-widget ui-state-default ui-button-icon-only ui-corner-right ui-button-icon" role="button" ari
    </span>
    <span class="ui-button-text">&nbsp;</span>
  </button>
</div>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pedro Nascimento  
View profile  
 More options Nov 13 2011, 9:07 am
From: Pedro Nascimento <pnascime...@gmail.com>
Date: Sun, 13 Nov 2011 12:07:31 -0200
Local: Sun, Nov 13 2011 9:07 am
Subject: Re: [Capybara] First visible input after a label

I use the same widget. Just add to spec/support: http://pastie.org/2856775

Note that this currently doesn't work at all on capybara-webkit, but it's
ok with webdriver.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Karl Baum  
View profile  
 More options Nov 14 2011, 10:16 am
From: Karl Baum <karl.b...@gmail.com>
Date: Mon, 14 Nov 2011 10:16:12 -0500
Local: Mon, Nov 14 2011 10:16 am
Subject: Re: [Capybara] First visible input after a label

Thanks Pedro.  Just last night i came up with something myself.

http://pastie.org/2862069

Instead of xpath, i am relying on jquery.

Curious what you think.

Thanks for your help!

-karl

On Nov 13, 2011, at 9:07 AM, Pedro Nascimento wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pedro Nascimento  
View profile   Translate to Translated (View Original)
 More options Nov 14 2011, 12:33 pm
From: Pedro Nascimento <pnascime...@gmail.com>
Date: Mon, 14 Nov 2011 15:33:36 -0200
Local: Mon, Nov 14 2011 12:33 pm
Subject: Re: [Capybara] First visible input after a label

It's a matter of taste -- I like using Capybara selectors whenever I can,
and avoid Javascript as much as I can (I'm coding in Ruby), but that's me.
If you don't mind using Javascript, it's fine.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »