Behat / Selenium

Par Palerm024, il y a 7 ans


Bonjour,

Voila je rencontre un petit problème avec mon code suite à la vidéo [Selenium] - [Behat].
En suivant la vidéo explicative, je n'arrive pas à lancer le browser via selenium pour faire le test javascript.
J'ai chercher à résoudre mon problème sur différents forum sans résultats.
Pourriez-vous m'éguiller sur la démarche à faire s'il-vous-plaît ?

#composer.json { "require": { "behat/behat": "3.5.0", "behat/mink": "*", "behat/mink-goutte-driver":"*", "behat/mink-extension": "*", "behat/mink-selenium2-driver": "*" }, "config": { "bin-dir": "bin/" } } #behat.yml default: extensions: Behat\MinkExtension: browser_name: chrome base_url: https://www.bing.com/, goutte: ~ selenium2: wd_host: http://99.80.48.204:4444/wd/hub/ suites: ui: contexts: [FeatureContext, WebContext] #google.feature @ui Feature: Bing Scenario: Homepage Given I am on the homepage Then I should see "Bing" And I should see "Images" And I should see "Connexion" @javascript Scenario: Search Given I am on the homepage When I fill in "sb_form_q" with "seleniumhq" And I wait for 1 seconds Then I should see "Selenium - Web Browser Automation" #WebContext.phh <?php use Behat\MinkExtension\Context\MinkContext; class WebContext extends MinkContext { /** *@When I wait for :arg1 seconds */ public function iWaitForSeconds($arg1) { $this->getSession()->wait($arg1 * 1000); } }

Le résultat est le suivant :

@javascript Scenario: Search Given I am on the homepage When I fill in "sb_form_q" with "seleniumhq" Form field with id|name|label|value|placeholder "sb_form_q" not found. And I wait for 1 seconds --- Failed scenarios: features/google.feature:4 features/google.feature:11 2 scenarios (2 failed) 8 steps (4 passed, 2 failed, 2 skipped) 8m44.61s (11.63Mb)

Merci de votre aide

Aucune réponse