Have you tested Vue ui with a selenium driver and capybara

I am going down this path and it’s not straightforward. Vue does not seem to be playing nicely. After clicking on a link to a page called Examples I try to expect that the h2 is Examples.

expect(page).to have_xpath "//h2[text()='Example']" 

Naturally the expect should wait for all JS to complete and for the h2 to appear on the screen, but this does not happen. So I was wondering if you could share insights of how you’ve been able to develop specs for a Vue ui?

Hi, I have used Vue with rails and system tests without any problem. Capybara will wait some time for an element to appear. Perhaps you should adjust your timeout.

Also I would recommend switching to Cuprite (GitHub - rubycdp/cuprite: Headless Chrome/Chromium driver for Capybara) its so much faster and overall better than Selenium+Webdrivers.

1 Like