Commit Graph

33 Commits

Author SHA1 Message Date
Dmitry Gozman
a91304a37a
feat(selectors): attribute selectors pierce open shadow roots (#1656)
References #1375.
2020-04-03 20:47:08 -07:00
Dmitry Gozman
270206e2b4
feat(text selector): match button input by value (#1657)
Inputs of type button and submit are rendered with their value as text,
so we match them by text.

Fixes #1427.
2020-04-03 14:18:08 -07:00
Dmitry Gozman
a9be3c5191
feat(text selector): pierce shadow roots (#1619) 2020-04-02 18:03:30 -07:00
Dmitry Gozman
a7b61a09be
fix(text selector): by default, do a substring match (#1618) 2020-03-31 23:04:04 -07:00
Stuart Lang
a007caef5c
Fixed small typos (#1588) 2020-03-30 09:03:13 -07:00
Dmitry Gozman
bce8fc1343
feat(selectors): allow running selectors in main world (#1533) 2020-03-25 20:59:48 -07:00
Pavel Feldman
9aa56a6b9e
api(browserType): remove devices, errors (#1368) 2020-03-12 17:58:00 -07:00
Dmitry Gozman
1d770af804
api: waitForElement accepts waitFor: attached|detached|visible|hidden (#1244)
This includes rename waitForSelector -> waitForElement and removes $wait.
2020-03-05 17:45:41 -08:00
Dmitry Gozman
342a2cf5cc
fix(selectors): continue matching after first fail for combined selectors (#1185) 2020-03-02 15:47:50 -08:00
Dmitry Gozman
ac2f04f10f
api(selectors): pass selector name when registering, allow file path (#1162) 2020-02-28 15:34:07 -08:00
Dmitry Gozman
7843c29d32
feat(selectors): auto-detect each selector part (#1160) 2020-02-28 14:41:32 -08:00
aesyondu
041b8c6e01
chore: fix typo on sepcified -> specified (#1153) 2020-02-27 17:44:19 -08:00
Joel Einbinder
857ffd8ea9
fix: text selector should be case insensitive without quotes (#1151) 2020-02-27 16:52:30 -08:00
Joel Einbinder
c03e8b7946
chore(tests): add types for tests (#915)
I enabled vscode autocomplete in our test files. Typechecking had too many errors to enable, but it caught some real bugs that I will fix in a follow up.

This patch contains:
* `test/types.d.ts` - d.ts file for our test runner.
* `test/tsconfig.json` - typescript project for our tests.
* JSDoc header in all specs to mark the describe as a TestSuite
* Drive-by fix of a launcher test that was using `if` instead of `it`
* Some drive-by fixes of unimpactful typos in tests.
2020-02-10 13:20:13 -08:00
Pavel Feldman
05d4746eb5
feat(selectors): temporarily remove zs engine (#824) 2020-02-03 16:14:37 -08:00
Andrey Lushnikov
b82bc5fbd4
feat: treat selectors with leading '(//' as xpath (#821)
This starts treating the following selectors as xpath:
- `page.$('//div')`
- `page.$('(//div)[1]')`
- `page.$('((((//div))))[1]')`

(and generally, any number of leading openting parenthesis)

Fixes #817
2020-02-03 14:52:18 -08:00
Dmitry Gozman
0e6b44d337
feat(selectors): selectors.register accepts function (#753) 2020-01-29 15:13:43 -08:00
Dmitry Gozman
2bef4aea03
feat(api): introduce selectors.register method (#701) 2020-01-28 11:20:34 -08:00
Dmitry Gozman
894e91bb68 fix(api): remove $x form the api, $$ works equally good (#544) 2020-01-20 11:30:22 -08:00
Dmitry Gozman
74b208cae5 feat(selectors): text=foo selector engine (#475) 2020-01-13 17:39:43 -08:00
Dmitry Gozman
929b7d979b
test(selectors): should auto-detect css selector with attributes (#477) 2020-01-13 17:13:36 -08:00
Yury Semikhatsky
778ab3deff chore: replace CHROME with CHROMIUM (#465) 2020-01-13 10:13:28 -08:00
Andrey Lushnikov
a7f3490e48 feat(testrunner): implement "dit" command (#312) 2019-12-19 16:47:35 -07:00
Andrey Lushnikov
8cc682c7b8 feat(testrunner): allow focusing all tests in a file
With this change, exporting a "fdescribe" function from a file
will focus all tests inside the file.
2019-12-18 17:13:39 -08:00
Dmitry Gozman
9afd35d3a1
feature(waitfor): waitFor visible or any by default (#284) 2019-12-18 14:28:16 -08:00
Dmitry Gozman
fd927000ea feature: update api around selectors (#280)
- Selector is again a string.
- Most methods taking selector also accept waitFor option.
- Available waitFor options are: 'visible', 'hidden', 'any' === true, false === undefined.
- waitForXPath is removed.
- waitForSelector is replaced by $(selector, { waitFor: true }).
2019-12-17 14:30:02 -08:00
Dmitry Gozman
48be99a56e feat(selectors): add id selectors (#270) 2019-12-16 20:49:18 -08:00
Pavel Feldman
df95b9ddb4 feat(waitFor): allow actions to wait for selector; make visible requirement default (#254) 2019-12-14 20:13:22 -07:00
Dmitry Gozman
59b0900321
feat(selectors): introduce zs selector engine (#214) 2019-12-12 09:02:37 -08:00
Pavel Feldman
f37d9bfe95 test: extract chromium-specific connect tests 2019-12-10 13:28:50 -08:00
Dmitry Gozman
fc5898892b
feat(selectors): support optional "visible" property in all selectors (#129) 2019-12-04 13:11:10 -08:00
Dmitry Gozman
bb1433a143
feat(selectors): support various kinds of selectors (#118)
This adds support for generic "engine=body [>> engine=body]*" selector syntax
and auto-detects simple css or xpath.
2019-12-02 17:33:44 -08:00
Pavel Feldman
9ba375c063 Initial commit 2019-11-19 10:58:15 -08:00