filmov
tv
Using capybara interactively with binding pry to access content in element text

Показать описание
Capybara also gives access to things like `first` and `last` and the content text itself which css selectors don't look at, for example:
The video doesn't show the browser window that we are querying against as it is off-screen but that is OK as the focus is the capyabara script interaction.
This video gives a sample of using Capybara intervactively to try various element selector strategies.
This avoid the 'make a change, ran a test' approach to trying different selectors which quickly becomes painfully slow and tedius. This changes what might be a 3 minute locator strategy change test run to a 10 second test - 18 TIMES FASTER !!!