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 {
186
186
return table_model
187
187
}
188
188
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 ) {
189
207
const table = await this . waitForDisplayed ( tableLocator )
190
208
let tbody = await table . findElement ( By . css ( 'tbody' ) )
191
209
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 {
35
35
return this . click ( CONSUMERS_SECTION )
36
36
}
37
37
async getConsumersTable ( ) {
38
- return this . getTable ( CONSUMERS_TABLE )
38
+ return this . getPlainTable ( CONSUMERS_TABLE )
39
39
}
40
40
async ensureDeleteQueueSectionIsVisible ( ) {
41
41
await this . click ( DELETE_SECTION )
You can’t perform that action at this time.
0 commit comments