![]() * `expect(page).to have_field('Your name', with: 'John')` this does not matchĭisabled input field. Option you can use `expect(page).to have_selector(:option, 'Name of o', * `expect(page).to `expect(page).to have_selector("input")`. Have new lines, than you can match multiline `/first.*second.*third/m` or first.*second.*third/` create three objects with first in the middle. * test sort order is with regex `expect(page).to have_text If `js: false`) so it is better to allways use visible: false for some elements Note that this is triggered only if `js: true` (and pass With `have_content "d", visible: false` but works with `have_css 'div', text: * If element is not visible, you can provide `visible: false` (does not work `page.has_text? text` (this will compare only text).įor testing if something is on the page, for example 3 rows, you can use Instead of `? text` (this will compare html tags) use With all you can use `text: '.'` and `count: 2` which is number of occurences. It is not same `expect(page).not_to have_text`Īnd `expect(page).to have_no_text` since in later case it will wait until it 22 capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(.21 I prefer to use Options instead Capabilities.17 Currently it does not work if you use headless chrome since it is not.16 another way to set profile is with prefs in desired_capabilities.15 expect(csv_content).to include first_customer.name.13 csv_content = DownloadHelpers.download_content.11 spec/support/download_feature_helpers.rb. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |