bdd - behat fails with javascript but succeeds without -


i'm writing acceptance tests php application using behat/mink , found out strange thing: behat can not find input field when javascript on, while finds same field when javascript off.

to precise: following scenario

scenario: adding article keywords, no javascript used  given on "articles/create"  when fill in "articles[title]" "about properties" ... 

passes perfectly. add tag javascript above scenario

@javascript     scenario: adding article keywords  given on "articles/create"  when fill in "articles[title]" "about properties" 

it starts fail:

when fill in "articles[title]" "about properties" # featurecontext::fillfield() form field id|name|label|value "articles[title]" not found. 

what might reason?

the @javascript run feature using selenium driver, selenium may take time load page, try adding step 'i wait ...' right after 'i on ...'. hopefully, it's dom taking time load.

@javascript     scenario: adding article keywords  given on "articles/create"  wait 1000  when fill in "articles[title]" "about properties" 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -