File tree 2 files changed +15
-13
lines changed
2 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -993,13 +993,12 @@ Returns **[Promise][9]<[Array][10]<any>>**
993
993
994
994
### grabCheckedElementStatus
995
995
996
- {{> grabCheckedElementStatus }}
996
+ Return the checked status of given element.
997
997
998
998
#### Parameters
999
999
1000
- - ` locator `
1001
- - ` options `
1002
- - ` See ` ** [ object] [ 5 ] ** [ https://playwright.dev/docs/api/class-locator#locator-is-checked ] [ 24 ]
1000
+ - ` locator ` ** ([ string] [ 8 ] | [ object] [ 5 ] )** element located by CSS|XPath|strict locator.
1001
+ - ` options ` ** [ object] [ 5 ] ?** See [ https://playwright.dev/docs/api/class-locator#locator-is-checked ] [ 24 ]
1003
1002
1004
1003
Returns ** [ Promise] [ 9 ] < ; [ boolean] [ 25 ] >**
1005
1004
@@ -1092,13 +1091,12 @@ Returns **[Promise][9]<void>** automatically synchronized promise through #re
1092
1091
1093
1092
### grabDisabledElementStatus
1094
1093
1095
- {{> grabDisabledElementStatus }}
1094
+ Return the disabled status of given element.
1096
1095
1097
1096
#### Parameters
1098
1097
1099
- - ` locator `
1100
- - ` options `
1101
- - ` See ` ** [ object] [ 5 ] ** [ https://playwright.dev/docs/api/class-locator#locator-is-disabled ] [ 26 ]
1098
+ - ` locator ` ** ([ string] [ 8 ] | [ object] [ 5 ] )** element located by CSS|XPath|strict locator.
1099
+ - ` options ` ** [ object] [ 5 ] ?** See [ https://playwright.dev/docs/api/class-locator#locator-is-disabled ] [ 26 ]
1102
1100
1103
1101
Returns ** [ Promise] [ 9 ] < ; [ boolean] [ 25 ] >**
1104
1102
Original file line number Diff line number Diff line change @@ -994,8 +994,10 @@ class Playwright extends Helper {
994
994
return this . _waitForAction ( ) ;
995
995
}
996
996
/**
997
- * {{> grabCheckedElementStatus }}
998
- * @param {object } See https://playwright.dev/docs/api/class-locator#locator-is-checked
997
+ * Return the checked status of given element.
998
+ *
999
+ * @param {CodeceptJS.LocatorOrString } locator element located by CSS|XPath|strict locator.
1000
+ * @param {object } [options] See https://playwright.dev/docs/api/class-locator#locator-is-checked
999
1001
* @return {Promise<boolean> }
1000
1002
*
1001
1003
*/
@@ -1004,14 +1006,16 @@ class Playwright extends Helper {
1004
1006
const el = await this . _locateElement ( locator ) ;
1005
1007
const type = await el . getAttribute ( 'type' ) ;
1006
1008
1007
- if ( type === 'checkbox' || type === 'radio' ) {
1009
+ if ( [ 'checkbox' , 'radio' ] . includes ( type ) ) {
1008
1010
return el . isChecked ( options ) ;
1009
1011
}
1010
1012
throw new Error ( 'Element is not a checkbox or radio input' ) ;
1011
1013
}
1012
1014
/**
1013
- * {{> grabDisabledElementStatus }}
1014
- * @param {object } See https://playwright.dev/docs/api/class-locator#locator-is-disabled
1015
+ * Return the disabled status of given element.
1016
+ *
1017
+ * @param {CodeceptJS.LocatorOrString } locator element located by CSS|XPath|strict locator.
1018
+ * @param {object } [options] See https://playwright.dev/docs/api/class-locator#locator-is-disabled
1015
1019
* @return {Promise<boolean> }
1016
1020
*
1017
1021
*/
You can’t perform that action at this time.
0 commit comments