On Mon, Nov 14, 2011 at 13:16, Karl Baum <karl.b
...@gmail.com> wrote:
> 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:
> 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.
> On Sun, Nov 13, 2011 at 00:47, Karl Baum <karl.b...@gmail.com> wrote:
>> 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"> </span>
>> </button>
>> </div>