find new join button in room directory

This commit is contained in:
Bruno Windels 2019-09-11 16:51:54 +02:00
parent e3f7246c37
commit f2a3a13678

View file

@ -23,12 +23,8 @@ module.exports = async function join(session, roomName) {
const roomInput = await session.query('.mx_DirectorySearchBox input'); const roomInput = await session.query('.mx_DirectorySearchBox input');
await session.replaceInputText(roomInput, roomName); await session.replaceInputText(roomInput, roomName);
const firstRoomLabel = await session.query('.mx_RoomDirectory_table .mx_RoomDirectory_name:first-child'); const joinFirstLink = await session.query('.mx_RoomDirectory_table .mx_RoomDirectory_join .mx_AccessibleButton');
await firstRoomLabel.click(); await joinFirstLink.click();
const joinLink = await session.query('.mx_RoomPreviewBar_ViewingRoom .mx_AccessibleButton_kind_primary');
await joinLink.click();
await session.query('.mx_MessageComposer'); await session.query('.mx_MessageComposer');
session.log.done(); session.log.done();
} }