All the bindings are triggered through the page and it’s viewmodel with the standard applyBindings function. This will bind the viewmodel itself and all the other views the page contains.
Since this call is blocking when it’s finished the bindings are applied. So I added a simple bool to the object that represented the page that tracks whether the page has finished it’s bindings.
SomeObject.BindingsAreApplied = false; // Lots of setup ko.applyBindings(pageViewModel); SomeObject.BindingsAreApplied = true;
Selenium WebDriver side
When the driver browses to the page in question it issues a WebDriverWait with the condition that the bool we just added to the javasript is true.