File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
packages/selenium-ide/src Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ export const Commands = Object.freeze({
7171 answerOnNextPrompt : "answer on next prompt" ,
7272 assertAlert : "assert alert" ,
7373 assertConfirmation : "assert confirmation" ,
74+ assertEditable : "assert editable" ,
75+ assertNotEditable : "assert not editable" ,
7476 assertElementPresent : "assert element present" ,
7577 assertElementNotPresent : "assert element not present" ,
7678 assertPrompt : "assert prompt" ,
@@ -102,6 +104,8 @@ export const Commands = Object.freeze({
102104 storeText : "store text" ,
103105 storeTitle : "store title" ,
104106 type : "type" ,
107+ verifyEditable : "verify editable" ,
108+ verifyNotEditable : "verify not editable" ,
105109 verifyElementPresent : "verify element present" ,
106110 verifyElementNotPresent : "verify element not present" ,
107111 verifyText : "verify text" ,
Original file line number Diff line number Diff line change @@ -347,6 +347,18 @@ Selenium.prototype.reset = function() {
347347 this . browserbot . resetPopups ( ) ;
348348} ;
349349
350+ Selenium . prototype . doVerifyEditable = function ( locator ) {
351+ if ( ! this . isEditable ( locator ) ) {
352+ throw new Error ( `Element with locator ${ locator } is not editable` ) ;
353+ }
354+ } ;
355+
356+ Selenium . prototype . doVerifyNotEditable = function ( locator ) {
357+ if ( this . isEditable ( locator ) ) {
358+ throw new Error ( `Element with locator ${ locator } is editable` ) ;
359+ }
360+ } ;
361+
350362Selenium . prototype . doVerifyText = function ( locator , value ) {
351363 let element = this . browserbot . findElement ( locator ) ;
352364 if ( getText ( element ) !== value ) {
@@ -390,6 +402,18 @@ Selenium.prototype.doVerifyElementNotPresent = function(locator) {
390402 }
391403} ;
392404
405+ Selenium . prototype . doAssertEditable = function ( locator ) {
406+ if ( ! this . isEditable ( locator ) ) {
407+ throw new Error ( `Element with locator ${ locator } is not editable` ) ;
408+ }
409+ } ;
410+
411+ Selenium . prototype . doAssertNotEditable = function ( locator ) {
412+ if ( this . isEditable ( locator ) ) {
413+ throw new Error ( `Element with locator ${ locator } is editable` ) ;
414+ }
415+ } ;
416+
393417Selenium . prototype . doAssertText = function ( locator , value ) {
394418 let element = this . browserbot . findElement ( locator ) ;
395419 if ( getText ( element ) !== value ) {
You can’t perform that action at this time.
0 commit comments