File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed
selenium/test/pageobjects Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,24 @@ module.exports = class BasePage {
186186 return table_model
187187 }
188188 async getTable ( tableLocator , firstNColumns , rowClass ) {
189+ const table = await this . waitForDisplayed ( tableLocator )
190+ const rows = await table . findElements ( rowClass == undefined ?
191+ By . css ( 'tbody tr' ) : By . css ( 'tbody tr.' + rowClass ) )
192+ let table_model = [ ]
193+
194+ for ( let row of rows ) {
195+ let columns = await row . findElements ( By . css ( 'td' ) )
196+ let table_row = [ ]
197+ for ( let column of columns ) {
198+ if ( firstNColumns == undefined || table_row . length < firstNColumns ) {
199+ table_row . push ( await column . getText ( ) )
200+ }
201+ }
202+ table_model . push ( table_row )
203+ }
204+ return table_model
205+ }
206+ async getPlainTable ( tableLocator , firstNColumns ) {
189207 const table = await this . waitForDisplayed ( tableLocator )
190208 let tbody = await table . findElement ( By . css ( 'tbody' ) )
191209 let rows = await tbody . findElements ( By . xpath ( "./child::*" ) )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ module.exports = class QueuePage extends BasePage {
3535 return this . click ( CONSUMERS_SECTION )
3636 }
3737 async getConsumersTable ( ) {
38- return this . getTable ( CONSUMERS_TABLE )
38+ return this . getPlainTable ( CONSUMERS_TABLE )
3939 }
4040 async ensureDeleteQueueSectionIsVisible ( ) {
4141 await this . click ( DELETE_SECTION )
You can’t perform that action at this time.
0 commit comments