Element matching css[div class/id] not found. (Behat\Mink\Exception\ElementNotFoundException
I write below simple scenario in my .feature file which is under /features folder. once I execute this feature file using command vendor/bin/behat command getting below error
Element matching css ".coh-component-instance-e66b8c1b-90ec-471d-ac14-127a605c9008" not found. (Behat\Mink\Exception\ElementNotFoundException.
The component which is inside tag that scenarios are failing and getting above error for below step.
e.g. Then I should see an ".views-field-title h1.field-content" element.
And component which is outside of tag this scenarios are working fine e.g. header & footer.
Below are my behat.yml file
default:
suites:
default:
contexts:
- FeatureContext
- Drupal\DrupalExtension\Context\DrupalContext
- Drupal\DrupalExtension\Context\MinkContext
- Drupal\DrupalExtension\Context\MessageContext
- Drupal\DrupalExtension\Context\DrushContext
- Drupal\DrupalExtension\Context\RawDrupalContext
gherkin:
cache: ~
extensions:
DMore\ChromeExtension\Behat\ServiceContainer\ChromeExtension: ~
Behat\MinkExtension:
goutte: ~
base_url: https://test.lndo.site/
javascript_session: selenium2
selenium2:
wd_host: http://chrome:9515
capabilities: { 'chrome': {'switches':['--start-maximized','--disable-gpu','--headless']}}
Drupal\DrupalExtension:
blackbox: ~
api_driver: drupal
drupal:
drupal_root: docroot
chrome:
extensions:
Behat\MinkExtension\Extension:
browser_name: chrome
Also if I try to find any text in page under tag getting below error
Element matching css ".views-field-title h1.field-content" not found. (Behat\Mink\Exception\ElementNotFoundException)
Comments
Comment #2
nitinsp commentedComment #3
nitinsp commentedComment #4
nitinsp commented