2025-04-25 20:14:34 +08:00
|
|
|
const { By, Key, until, Builder } = require('selenium-webdriver')
|
|
|
|
|
|
|
|
const BasePage = require('./BasePage')
|
|
|
|
|
|
|
|
|
|
|
|
const STREAM_NAME = By.css('div#main h1 b')
|
|
|
|
const DELETE_SECTION = By.css('div#main div#delete')
|
|
|
|
const DELETE_BUTTON = By.css('div#main div#delete input[type=submit]')
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = class StreamPage extends BasePage {
|
|
|
|
async isLoaded() {
|
|
|
|
return this.waitForDisplayed(STREAM_NAME)
|
|
|
|
}
|
|
|
|
async getName() {
|
|
|
|
return this.getText(STREAM_NAME)
|
|
|
|
}
|
|
|
|
async ensureDeleteQueueSectionIsVisible() {
|
|
|
|
await this.click(DELETE_SECTION)
|
2025-05-07 23:38:31 +08:00
|
|
|
return this.driver.findElement(DELETE_SECTION).isDisplayed()
|
2025-04-25 20:14:34 +08:00
|
|
|
}
|
|
|
|
async deleteStream() {
|
|
|
|
await this.click(DELETE_BUTTON)
|
|
|
|
return this.acceptAlert()
|
|
|
|
}
|
|
|
|
}
|