jeudi 21 septembre 2017

Button doesn't get clicked using capybara (using firefox and xvfb)

I'm trying to set up cucumber tests in docker so I found out that I need to use xvfb in order to at least run tests without GUI. After hours of struggling I've finally run tests, but now:

I'm testing sending data through the form. I'm filling neccessary fields and I'm clicking button, but it doesn't do anything. It works fine when I'm browsing through the page; it is okay when I run cucumber locally without docker (with or without headless firefox), but it fails in that one case. When I'm debugging it sees button, click returning 'ok', but it does nothing. Also current_url doesn't changed and Product is not saved to db (so I assume button does not get clicked).

Could it be problem with not compiled scripts files, maybe javascript doesn't work properly in headless firefox or something else?

Any help would be highly appreciated!

Aucun commentaire:

Enregistrer un commentaire