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
Post a Comment