File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/selenium-ide/src/neo/IO/legacy Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -117,9 +117,11 @@ export function migrateTestCase(data) {
117117 const sanitized = sanitizeXml ( data ) ;
118118 const result = JSON . parse ( convert . xml2json ( sanitized , { compact : true } ) ) ;
119119 const baseUrl = result . html . head . link . _attributes . href ;
120+ let tr = result . html . body . table . tbody . tr ;
121+ tr = Array . isArray ( tr ) ? tr : [ tr ] ;
120122 const test = {
121123 name : result . html . body . table . thead . tr . td . _text ,
122- commands : result . html . body . table . tbody . tr . filter ( row => ( row . td [ 0 ] . _text && ! / ^ w a i t / . test ( row . td [ 0 ] . _text ) ) ) . map ( row => (
124+ commands : tr . filter ( row => ( row . td [ 0 ] . _text && ! / ^ w a i t / . test ( row . td [ 0 ] . _text ) ) ) . map ( row => (
123125 {
124126 command : row . td [ 0 ] . _text && row . td [ 0 ] . _text . replace ( "AndWait" , "" ) ,
125127 target : xmlunescape ( parseTarget ( row . td [ 1 ] ) ) ,
You can’t perform that action at this time.
0 commit comments