Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8820781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:41:37+00:00 2026-06-14T05:41:37+00:00

I have a page that’s rendering a wijmo combobox via the wijcombobox knockout binding

  • 0

I have a page that’s rendering a wijmo combobox via the wijcombobox knockout binding ( http://wijmo.com/wiki/index.php/Using_Wijmo_with_Knockout ). I’m having difficulty testing this using capybara because of a race condition between the tests running and the click event being bound. There are possibly other race conditions as well, but this is the current one tripping me up. This is what I have as a current workaround:

def click_on_combobox_till_options_appear
  wait_until(10) do
    page.find('.wijmo-wijcombobox-trigger').click
    page.has_css?('.wijmo-wijlist-item')
  end
end

I’m using ‘kb-inject’ to setup my ViewModel bindings.

Is there a javascript event I can hook up to or property I can test to indicate that applyBindings has finished executing, so that I can avoid workarounds like the one above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T05:41:38+00:00Added an answer on June 14, 2026 at 5:41 am

    In terms of waiting for applyBindings to be called, we came up with the following workaround. It’s not great, but should serve as a basis for solving similar problems (replace App with a namespace that makes sense):

    def wait_for_ko_bindings
      js = <<END_JS
    $(function() {
      ko.bindingHandlers.isLoadedForTests = {
        init: function(element, valueAccessor, allBindingsAccessor, viewModel) {
          App.ko_bindings_loaded_for_tests = true;
        }
      };
      var viewModel = {};
    
      var testNode = document.createElement('div');
      testNode.innerHTML = '<div data-bind="isLoadedForTests:1"></div>';
      document.body.appendChild(testNode);
      kb.applyBindings(viewModel, testNode);
    });
    END_JS
      page.execute_script(js)
      wait_until do
        page.evaluate_script('App.ko_bindings_loaded_for_tests === true')
      end
    end
    

    Specifically for the wijcombobox, we found the following to work:

    def click_combobox
      wait_until(10) do
        page.find('.wijmo-wijcombobox-trigger').click
        page.all('.wijmo-wijlist-item').length > 0
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page that uses another page via the include() function. The page
Suppose that you have a page that renders in browser's standard rendering mode. Suppose
I have page that creates a table: http://gupii.co.uk/rap/weekTable.php and I'm using a plugin to
I have a page that sends a request to a RESTful web service (via
I have page that shows items in an index. I'm able to get items
I have a page that submits some data via AJAX to another page where
I have a page that posts something to the server via AJAX. The server
I have a page that builds out a table. Nothing else on that page
I have a page that lets the user edit the content of the page
I have a page that uses the Telerik RadListView control and a Telerik RadDataPager

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.