You are on page 1of 94

package org.jitsi.meet.test.

tests;

import java.io.File;
import java.io.IOException;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.concurrent.TimeUnit;

import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.lang3.StringUtils;
import org.jitsi.meet.reports.ReportingManager;
import org.jitsi.meet.test.base.ConfigurationManager;
import org.jitsi.meet.test.base.JitsiMeetUrl;
import org.jitsi.meet.test.base.MeetingType;
import org.jitsi.meet.test.base.RollType;
import org.jitsi.meet.test.base.VideosQuality;
import org.jitsi.meet.test.base.WAIT_FOR;
import org.jitsi.meet.test.pageobjects.web.ChatAndPollsToolBar;
import org.jitsi.meet.test.pageobjects.web.ChatPanel;
import org.jitsi.meet.test.pageobjects.web.GetStartedOptions;
import org.jitsi.meet.test.pageobjects.web.MoreActions;
import org.jitsi.meet.test.pageobjects.web.ParticipantPanel;
import org.jitsi.meet.test.pageobjects.web.Toolbar;
import org.jitsi.meet.test.util.MeetUtils;
import org.jitsi.meet.test.util.TestUtils;
import org.jitsi.meet.test.web.WebParticipant;
import org.jitsi.meet.test.web.WebParticipantOptions;
import org.jitsi.meet.test.web.WebTestBase;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.TimeoutException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.Assert;
import org.testng.annotations.Test;

import com.aventstack.extentreports.Status;

public class PreJoinAndHomePageTests extends WebTestBase {


WebParticipant participant1;
WebParticipant participant2;
WebParticipant participant3;
WebParticipant participant4;
OpenMeetingE2EMethods openMeetingE2EMethods;
ParticipantPanel participantPanel1;
ParticipantPanel participantPanel2;
ParticipantPanel participantPanel3;
Toolbar toolbar_Main;
Toolbar toolbar_Second;
Toolbar toolbar_Third;

MoreActions moreActionsParticipant1;
MoreActions moreActionsParticipant2;
MoreActions moreActionsParticipant3;
WebTestBase testBase;
ChatPanel chatPanel1;
ChatPanel chatPanel2;
ChatPanel chatPanel3;
MeetingType type;
ChatAndPollsToolBar chatPanelToolbar1;
ChatAndPollsToolBar chatPanelToolbar2;
ChatAndPollsToolBar chatPanelToolbar3;
GetStartedOptions getstartedOptions1;
GetStartedOptions getstartedOptions2;
GetStartedOptions getstartedOptions3;
private Integer chatIndex;

private static final String DEFAULT_CONFIG =


"config.requireDisplayName=false" + "&config.debug=true"
+ "&config.testing.testMode=true" + "&config.disableAEC=true" +
"&config.disableNS=true"
+ "&config.enableTalkWhileMuted=false" +
"&config.callStatsID=false" + "&config.alwaysVisibleToolbar=true"
+ "&config.p2p.enabled=false" + "&config.p2p.useStunTurn=false" +
"&config.pcStatsInterval=1500"
+ "&config.prejoinPageEnabled=false" + "&config.gatherStats=true"
+ "&config.disable1On1Mode=true"
+ "&config.analytics.disabled=true" +
"&interfaceConfig.SHOW_CHROME_EXTENSION_BANNER=false"
+ "&interfaceConfig.DISABLE_FOCUS_INDICATOR=true";

@Override
protected void setupClass() {
super.setupClass();
List<RollType> rollType = new ArrayList<RollType>();
rollType.add(RollType.OWNER);
rollType.add(RollType.MODERATOR);
rollType.add(RollType.GUEST);
chatIndex = 0;
}

protected void buildpages() {


participantPanel1 = participant1.getParticipantPanel();
participantPanel2 = participant2.getParticipantPanel();
participantPanel3 = participant3.getParticipantPanel();

toolbar_Main = participant1.getToolbar();
toolbar_Second = participant2.getToolbar();
toolbar_Third = participant3.getToolbar();

moreActionsParticipant1 = participant1.getMoreActions();
moreActionsParticipant2 = participant2.getMoreActions();
moreActionsParticipant3 = participant3.getMoreActions();

chatPanel1 = participant1.getChatPanel();
chatPanel2 = participant2.getChatPanel();
chatPanel3 = participant3.getChatPanel();

chatPanelToolbar1 = chatPanel1.getChatandPollsToolBar();
chatPanelToolbar2 = chatPanel2.getChatandPollsToolBar();
chatPanelToolbar3 = chatPanel3.getChatandPollsToolBar();

getstartedOptions1 = participant1.getStartedOptions();
getstartedOptions2 = participant2.getStartedOptions();
getstartedOptions3 = participant3.getStartedOptions();
}

@Test(priority = 0)
public void preLoginPageValidations() {
// SAME-T2374, SAME-T2399,SAME-T2415, SAME-T2425,SAME-T2290,SAME-T2322,
// SAME-T2323,SAME-T2238 (1.0), SAME-T2393
// SAME-T811
// SAME-T829
// SAME-T828 (1.0)
// SAME-T2003 (1.0)
// SAME-T815 (1.0)===>meeting room
// SAME-T799 (1.0)
// SAME-T2198 (1.0)===>meeting room
// SAME-T1021 (1.0)====>meeting room
int clickRetry = 0;
int retryCount = 0;
boolean skip = false;
boolean retry = true;
while (retry) {
try {

if (!skip) {
WebParticipantOptions targetOptions1 = new
WebParticipantOptions();
WebParticipantOptions targetOptions2 = new
WebParticipantOptions();
WebParticipantOptions targetOptions3 = new
WebParticipantOptions();
String checkLastMeeting = "";
targetOptions1.setRole(RollType.OWNER.getRollType());
String configPrefix = getUsernamePrefix() + (0 +
getStartIndex() + 1);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
this.participant1 =
participants.createParticipant(configPrefix, targetOptions1);
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");
if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0,
URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");
meetURL.appendConfig(getDefaultConfig(), false);
// TestUtils.print(getName() + " is opening URL: " +
meetURL);
participant1.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
loginMeeting(participant1, URL, password, true,
true);
participant1.getMeetingTypesOptions().clickHclLogo();
retValue = retValue &&
participant1.getMeetingTypesOptions().checkHomePageLabel();

participant1.getMeetingTypesOptions().clickMeetingsTabButton();
retValue &= participant1.getMeetingTypesOptions()
.checkMeetingNamevalidation("Sametime
Meeting Room");
System.out.println(retValue);
participant1.getStartedOptions().clickdropDown_btn();
retValue = retValue &
participant1.getStartedOptions().checkSettingsOption();

participant1.getStartedOptions().clickSettingsOption();
retValue = retValue &
participant1.getStartedOptions().checkAudioPlayTestSound();
System.out.println(retValue);

participant1.getStartedOptions().clickSettingsOKOption();

participant1.getMeetingTypesOptions().clickrecentTabButton();

/** SAME-T2003 (1.0) **/


/*
* new WebDriverWait(participant1.getDriver(),
* 60).until((ExpectedCondition<Boolean>) wd ->
((JavascriptExecutor)
* wd).executeScript("return
document.readyState").equals("complete"));
*/

participant1.getMeetingTypesOptions().checkRecentMeetingsList();
retValue = retValue &
participant1.getMeetingTypesOptions().validaeTimeFotrmatText();
System.out.println(retValue);

participant1.getMeetingTypesOptions().clickrecentOptionList();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRecentCallsOption();
System.out.println(retValue);

participant1.getMeetingTypesOptions().clickRecentCallsOption();
// retValue =
// retValue|
participant1.getMeetingTypesOptions().CheckcurrentCallsLabel();
System.out.println(retValue);
TestUtils.waitMillis(500);

participant1.getMeetingTypesOptions().clickMeetingsTabButton();
List<WebElement> elemList =
participant1.getStartedOptions().getLastMeetingsList();
if (elemList.size() > 0) {
checkLastMeeting = elemList.get(0).getText();
}

participant1.getStartedOptions().getStartedbtnClick();
TestUtils.waitMillis(500);

participant1.getStartedOptions().clickCreateMeetingOption();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
System.out.println(retValue);

participant1.getMeetingTypesOptions().EnterMeetingNameText("vgdvgdv");
if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText("hdhh");
retValue = retValue
&
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterLabel();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);
retValue = retValue
& !
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterLabel();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkErrorEmptyText();
System.out.println(retValue);

if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}

participant1.getMeetingTypesOptions().clickRestoreDeafults();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected();
retValue = retValue & !
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd();
participant1.getDriver().navigate().back();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
System.out.println(retValue);

participant1.getMeetingTypesOptions().EnterMeetingNameText(checkLastMeeting.toUpper
Case());

participant1.getMeetingTypesOptions().clickConfidentialMenu();
retValue = retValue &
participant1.getStartedOptions().checkMeetingAlreadyExistsText();
// SAME-T829

participant1.getMeetingTypesOptions().EnterMeetingNameText("$#@!&*");
retValue = retValue &
participant1.getMeetingTypesOptions().checkerrorInvalidText();
participant1.getMeetingTypesOptions().EnterMeetingNameText(" ");
retValue = retValue &
participant1.getMeetingTypesOptions().checkErrorEmptyText();

participant1.getMeetingTypesOptions().clickColloborationMenu();

String meetingName = getMeetingName();

participant1.getMeetingTypesOptions().EnterMeetingNameText(meetingName);
startMeeting();
int i = 0;
do {
participant1.getDriver().navigate().back();
if
(participant1.getStartedOptions().checkStartedButton())
break;
i += 1;
} while (i <= 3);

participant1.getStartedOptions().getStartedbtnClick();

participant1.getStartedOptions().clickCreateMeetingOption();

participant1.getMeetingTypesOptions().clickColloborationMenu();

participant1.getMeetingTypesOptions().EnterMeetingNameText(meetingName);

participant1.getMeetingTypesOptions().clickConfidentialMenu();
retValue |=
participant1.getStartedOptions().checkMeetingAlreadyExistsText();
System.out.println(retValue);
}
retry = false;
} catch (Exception x) {
System.out.println("Exception in preLoginPageValidations");
skip = true;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
if (x.getMessage().contains("App Not defined"))
skip = true;
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
}

@Test(priority = 1)

public void launchPrejoinAndCheckAllMeetingTypeUI() {


// SAME-T2268,SAME-2325,SAME-2289,SAME-T2398
// SAME-T1564 (1.0)
// //SAME-T1550 (1.0)
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 5);

Boolean retValue = true;


WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
targetOptions2.setRole(RollType.MODERATOR.getRollType());
targetOptions3.setRole(RollType.GUEST.getRollType());

targetOptions1.setMeetingType(MeetingType.OPENWITHPASSWORD.getMeetingType());
launchPreJoinPage(targetOptions1,configPrefix);
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
// validate UI elements of colloboration menu
participant1.getMeetingTypesOptions().clickColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checscheduleMeetingColloboativeText();
retValue = retValue &
participant1.getMeetingTypesOptions().checflexibleMeetingLinkt();
retValue = retValue &
participant1.getMeetingTypesOptions().checfullyCustomizableLink();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordAvailable();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordCheckBox();
retValue = retValue & !
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordisDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBox();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBoxIsDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassLbl();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBox();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedLabel();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembers();
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembersDiabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuests();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsLbl();
retValue = retValue &
participant1.getMeetingTypesOptions().checkCancelButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheck();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheckDisabled();

retValue = retValue &


participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkAvailable();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
participant1.getMeetingTypesOptions().clickLectureStyleMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checklectureStyleLabelScheduleModerated();
retValue = retValue &
participant1.getMeetingTypesOptions().checklectureStyleLabelLargeSizeMeeting();
retValue = retValue &
participant1.getMeetingTypesOptions().checklectureStyleLabelPanelistSpeakerAccess()
;

retValue = retValue &


participant1.getMeetingTypesOptions().checkMeetingPasswordAvailable();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkMeetingPasswordisDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBox();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBoxIsDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassLbl();

retValue = retValue &


participant1.getMeetingTypesOptions().checkWaitingRoomByPassLbl();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBoxisDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedLabel();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembers();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkManageMembersDiabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuests();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsLbl();
retValue = retValue &
participant1.getMeetingTypesOptions().checkCancelButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheck();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheckDisabled();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
retValue = retValue &
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkAvailable();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
participant1.getMeetingTypesOptions().clickConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().confidentialLabelScheduleModerated();
retValue = retValue &
participant1.getMeetingTypesOptions().confidentialLabelLargeSizeMeeting();
retValue = retValue &
participant1.getMeetingTypesOptions().confidentialLabelPanelistSpeakerAccess();

retValue = retValue &


participant1.getMeetingTypesOptions().checkMeetingPasswordAvailable();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingPasswordCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkMeetingPasswordisDisabled();
retValue = retValue
&
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterCompulsor
yLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxLabel();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBoxIsDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkWaitingRoomByPassLbl();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBoxisDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsDisabled();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembers();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkManageMembersDiabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuests();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsLbl();
retValue = retValue &
participant1.getMeetingTypesOptions().checkCancelButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheck();
retValue = retValue &
participant1.getMeetingTypesOptions().checkStartButtonLabelCheckDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkDisabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLinkAvailable();
ReportingManager.instance().getExtenttest().log(Status.INFO, "Step
status" + retValue);
Assert.assertTrue(retValue);

@Test(priority = 3)

public void preJoinScreenColloboratibveModeratorsEnabled() {


// SAME-2423,SAME-T2384,SAME-2383,SAME-T2308 (1.0),SAME-T2261,SAME-
T2222
// SAME-T812 (1.0)
// (1.0),SAME-T2265 (1.0), SAME-T2288
// SAME-T817 (1.0)
// SAME-T807 (1.0)
Boolean retValue = true;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex()+1);

launchPreJoinPage(targetOptions1,configPrefix);

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int clickRetry = 0;
int retryCount = 0;
boolean skip = false;
boolean retry = true;
while (retry) {
try {

if (!skip) {
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
addManageMemberFunctionality("susan adams2");

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue = retValue &
participant1.getMeetingTypesOptions().checkMeetingNamevalidation(meetingName);

participant1.getMeetingTypesOptions().clickMeetingUrlLink(meetUrl.getRoomName());

participant1.getMeetingTypesOptions().clickJoinMeetingButton();
waitforMeetingLoad(participant1.getDriver());

ConfigurationManager.instance().setMeetingCreated(true);

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
participant2 = joinParticipantAndWait(1, meetUrl,
targetOptions2);
}
configPrefix = getUsernamePrefix() + 4;
// **SAME-T2261**//
this.participant3 =
participants.createParticipant(configPrefix, targetOptions2);
participant3.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant3.getDriver().get(meetUrl.getServerUrl());
joinGuestParticpiant(participant3);
participant3.getDriver().get(meetUrl.getServerUrl() + "/" +
meetUrl.getRoomName());
retValue = retValue &
participant3.getMeetingTypesOptions().checkJoinMeetingButton();
System.out.println(retValue);
TestUtils.switchToIframe(participant1.getDriver(), false);
TestUtils.switchToIframe(participant2.getDriver(), false);
// buildpages();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkModeratedMeetingSelected();
retValue = retValue &
participant1.getSettingsActions().CheckAllowGuestsIsSelected();
retValue = retValue &
participant1.getSettingsActions().checkbtnManageMemebersEnabled(false);
System.out.println(retValue);

participant1.getSettingsActions().checkbtnManageMemebersClicable();

participant1.getSettingsActions().clickkbtnManageMemebersClicable();
TestUtils.waitMillis(500);
retValue = retValue &
participant1.getSettingsActions().ValidateManageMembersName(0, "susan adams2");

participant1.getSettingsActions().clickBackToSettingsButton();

participant1.getSettingsActions().ClickModeratedMeetingCheckBox();
if
(participant1.getMeetingTypesOptions().checkContinueButton()) {
retValue = retValue &
participant1.getMeetingTypesOptions().checkMemberAccess();
retValue = retValue &
participant1.getMeetingTypesOptions().checkLabelContinue();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblModeratedRoomDisabled();
System.out.println(retValue);

participant1.getMeetingTypesOptions().clickContinueButton();
}

retValue = retValue & !


participant1.getSettingsActions().checkbtnManageMemebersEnabled(true);
System.out.println(retValue);
/*
if(this.participant1.getSettingsActions().waitforParticipiantDialoGOkButton())

participant1.getSettingsActions().clickSettingDialogOkButton();*/
TestUtils.switchToIframe(participant1.getDriver(), false);

if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2);
participant1.setRoles(RollType.OWNER.getRollType());
participant2.setRoles(RollType.MODERATOR.getRollType());

// retValue = retValue &&


retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
System.out.println(retValue);

//validateRecordingOptions(participant1);
//validateRecordingOptions(participant1);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();
retValue = retValue &
participant1.getStartedOptions().checkStartedButton();
System.out.println(retValue);

participant1.getMeetingTypesOptions().renameRecordingBasedOnMeetingName(meetUrl.get
RoomName(), "xyz");
retValue&=participant1.getMeetingTypesOptions()
.validateMyRecentRecordingText(meetUrl.getRoomN
ame() + "xyz");
System.out.println(retValue);

participant1.getMeetingTypesOptions().clickrecentTabButton();
/*
*
participant1.getMeetingTypesOptions().clickRecentMeetingsOverflowButton(
* meetUrl.getRoomName()); TestUtils.waitMillis(1000);
retValue = retValue &
*
participant1.getMeetingTypesOptions().checkmeetingRecordingOption();
* System.out.println(retValue);
*
*
participant1.getMeetingTypesOptions().clickclickRemoveListOptionsButton();
* retValue = retValue &
*
participant1.getMeetingTypesOptions().checkMeetingListRemovalHeader();
* System.out.println(retValue);
*/

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoinScreenColloboratibveModeratorsEnabled");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
if (x.getMessage().contains("App Not defined"))
skip = true;
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}

}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 2)

public void preJoinScreenMeetingValidation() {


// SAME-T2354,SAME-T2376,SAME-T2397,SAME-T2429,SAME-T2365,SAME-
T2366,SAME-T2389,SAME-T2404
Boolean retValue = true;
Boolean retry = true;
// validate UI elements of colloboration menu
String password =
ConfigurationManager.instance().getProperties().get("password");
Random rand = new Random();
try {
// Generate random integers in range 0 to 999999
int rand_meetingNumber = rand.nextInt(1000000);
participant1.getMeetingTypesOptions().clickConfidentialMenu();
if
(participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected()) {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckboxNoValidation();
}
retValue = retValue
&
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterCompulsor
yLabel();

participant1.getMeetingTypesOptions().EnterMeetingNameText("sample" +
rand_meetingNumber);

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);
TestUtils.waitMillis(500);
retValue = retValue
& !
participant1.getMeetingTypesOptions().checkMeetingPasswordMinimumCharacterCompulsor
yLabel();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkAllowGuestsisSelected();
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsisDisabled();
participant1.getMeetingTypesOptions().clickStartButtonLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();
if (!
participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected()) {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckboxNoValidation();
}
retValue = retValue &
participant1.getMeetingTypesOptions().checkAllowGuestsisSelected();
retValue = retValue & !
participant1.getMeetingTypesOptions().checkAllowGuestsisDisabled();
if
(participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected()) {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckboxNoValidation();
}
participant1.getMeetingTypesOptions().clickLectureStyleMenu();
TestUtils.waitMillis(500);
if
(participant1.getMeetingTypesOptions().checkAllowGuestsisSelected()) {

participant1.getMeetingTypesOptions().clickAllowGuestsCheckBox();
}
if
(participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd()) {

participant1.getMeetingTypesOptions().clickCheckMeetingPasswordWithouTCheck();
}
if
(participant1.getMeetingTypesOptions().checkWaitingRommCheckBoxSleected()) {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckboxNoValidation();
}
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected())

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
participant1.getMeetingTypesOptions().clickStartButtonLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();
TestUtils.waitMillis(500);

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();
addManageMemberFunctionality("susan adams8");
if
(participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected())

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
retValue = retValue &
participant1.getMeetingTypesOptions().checkMemberAccess();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomDleetion();
retValue = retValue &
participant1.getMeetingTypesOptions().checkLabelContinue();
participant1.getMeetingTypesOptions().clickContinueButton();
TestUtils.waitMillis(1000);
participant1.getMeetingTypesOptions().clickColloborationMenu();

if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected())

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
if
(participant1.getMeetingTypesOptions().checkAllowGuestsisSelected()) {

participant1.getMeetingTypesOptions().clickAllowGuestsCheckBox();
}
participant1.getMeetingTypesOptions().clickStartButtonLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblRestrictedListEmpty();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomEnabled();
participant1.getMeetingTypesOptions().clickCloseButton();
addManageMemberFunctionality("susan adams8");
if
(participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected())

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
retValue = retValue &
participant1.getMeetingTypesOptions().checkMemberAccess();
retValue = retValue &
participant1.getMeetingTypesOptions().checklblWaitingRoomDleetion();
retValue = retValue &
participant1.getMeetingTypesOptions().checkLabelContinue();
participant1.getMeetingTypesOptions().clickContinueButton();
logOutfunctionality();
} catch (Exception s) {
System.out.println("Exception in
preJoinScreenMeetingValidation");
retValue = retValue & false;
cleanupClass();

}
cleanupClass();
Assert.assertTrue(retry);
}

@Test(priority = 4)
public void preJoinScreenColloboratibveModeratorsIsDisabled() {
// SAME-T2360,SAME-2403,SAME-2405,SAME-T2291 (1.0)
// SAME-T798 (1.0)
Boolean retValue = true;
String text1 = "sample_text_1";
String text2 = "sample_text_2";
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 7);

launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int clickRetry = 0;
int retryCount = 0;
boolean skip = false;
boolean retry = true;
while (retry) {
try {

if (!skip) {
if
(participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
startMeetingSaveAndLaunch(meetUrl);

participant1.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));

MeetUtils.waitForPageToLoad(participant1.getDriver());

ConfigurationManager.instance().setMeetingCreated(true);

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
participant2 = joinParticipantAndWait(1, meetUrl,
targetOptions2);
}
TestUtils.switchToIframe(participant1.getDriver(), false);
TestUtils.switchToIframe(participant2.getDriver(), false);
// buildpages();
// Owner sends message and verifies in all 2 chat panels
retValue = retValue &&
getchatValidation(participant1,participant2,text1, text2);

retValue = retValue &&


validateRecordingOptions(participant1,participant2);

System.out.println(retValue);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();

participant1.getMeetingTypesOptions().clickMeetingUrlLink(meetUrl.getRoomName());
retValue = retValue &&
participant1.getMeetingTypesOptions().checkJoinMeetingButton();
retry = false;

catch (Exception x) {
System.out.println("the pre join pae
preJoinScreenColloboratibveModeratorsIsDisabled");
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
if (x.getMessage().contains("App Not defined"))
skip = true;
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
logOutfunctionality();
cleanupClass();

Assert.assertTrue(retValue);

@Test(priority = 5)

public void preJoineConfidentialMeetingWithBypassAndManageAccess() {


// SAME-T2362,SAME-T2401 partial,SAME-T2381 partial,SAME-T2291 (1.0)
// SAME-T1769 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 8);
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickConfidentialMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();

participant1.getMeetingTypesOptions().clickCheckWaitingRoommBypass();
addManageMemberFunctionality("susan adams2");
startMeetingWithPassword(password,participant1);

ConfigurationManager.instance().setMeetingCreated(true);
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkTileViewButton();

targetOptions2.setRole(RollType.AUTHENTICATED.getRollType());

targetOptions2.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOMBYPASS.getMeet
ingType());
participant2 = joinParticipantAndWait(1, meetUrl,
targetOptions2);
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();
retry = false;

catch (Exception x) {
System.out.println("exception got in the
preJoineConfidentialMeetingWithBypassAndManageAccess");
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();

Assert.assertTrue(retValue);

@Test(priority = 6)

public void preJoineCollaborativeMeetingWithBypassAndWaitingRoom() {


// SAME-T2372,SAME-T2291 (1.0)
participant2 = null;
participant1 = null;
Boolean retValue = true;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 4);
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
participant2 = null;
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();

participant1.getMeetingTypesOptions().clickCheckWaitingRoommBypass();
startMeetingWithPassword(password,participant1);
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
ConfigurationManager.instance().setMeetingCreated(true);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGBYPASSPASSWORD.getMeetingType(
));
participant2 = joinParticipantAndWait(1, meetUrl,
targetOptions2);
TestUtils.switchToIframe(participant2.getDriver(), false);
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
getchatValidation(participant1,participant2,"collobrativeByapss",
"ColloborativePasswordBypass");
retValue = retValue &&
validateRecordingOptions(participant1,participant2);
TestUtils.switchToIframe(participant1.getDriver(), false);
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2);
retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
TestUtils.waitMillis(500);
participant1.getMoreActions().clickEndMeetingCloseButton();
retry = false;

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

}
@Test(priority = 7)
public void LectureStyleMeetingWithBypassAndWaitingRoom() {
// SAME-T2254,SAME-T2363,SAME-T2291 (1.0),SAME-T2291 (1.0)
Boolean retValue = true;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 10);
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickLectureStyleMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();

participant1.getMeetingTypesOptions().clickCheckWaitingRoommBypass();
startMeetingWithPassword(password,participant1);
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
ConfigurationManager.instance().setMeetingCreated(true);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.LECTURESTYLEPASSWAITINGROOM.getMeetingTyp
e());
participant2 = joinParticipantAndWait(1, meetUrl,
targetOptions2);
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();
retValue = retValue && !
(participant1.getMoreActions().validateLectureStyleBanner());
TestUtils.switchToIframe(participant1.getDriver(), false);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();
participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();
retry = false;

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 8)
public void ColloborativeMeetingIsLocked() {
// SAME-2373,SAME-T2291 (1.0),SAME-T2291 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 8);
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckbox();

participant1.getMeetingTypesOptions().clickcheckModeratedCheckbox();

startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
ConfigurationManager.instance().setMeetingCreated(true);
TestUtils.switchToIframe(participant1.getDriver(), false);
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
participant1.getParticipantPanel().clickLockButton();
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGRESTRICTEDMODERATOR.getMeeting
Type());

configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl() + "/" +
meetUrl.getRoomName());
retValue = retValue &&
participant2.getMeetingTypesOptions().checkcheckMeetingLockedText();
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 9)
public void ColloborativeMeetingWaitingRoomEnabled() {
// SAME-T2401 partial,SAME-T2291 (1.0)
Boolean retValue = true;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 3);
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
ConfigurationManager.instance().setMeetingCreated(true);
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGRESTRICTEDMODERATOR.getMeeting
Type());

configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);

participant2.executeScript("console.log('--- Will start


test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl() + "/" +
meetUrl.getRoomName());
retValue = retValue &&
participant2.getMeetingTypesOptions().checkModeratorLabelWait();
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 10)
public void ColloborativeMeetingRestricted() {
// SAME-T2381 partial,SAME-T2291 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 5);
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of colloboration menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckbox();
addManageMemberFunctionality("susan adams2");
startMeetingContinue();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENRESTRICTED.getMeetingType());
configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl() + "/" +
meetUrl.getRoomName());

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 90);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 11)
public void ConfidentialMeetingWaitingList() {
// SAME-T2292, SAME-T2399,SAME-T2415,SAME-T2293 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 8);

// validate UI elements of confidential meeting menu


String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickConfidentialMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();
addManageMemberFunctionality("susan adams9");
startMeetingWithPassword(password,participant1);
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);

targetOptions2.setRole(RollType.AUTHENTICATED.getRollType());

targetOptions2.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOM.getMeetingTyp
e());
configPrefix = getUsernamePrefix() + 9;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status" +


retValue);

joinExistingMeeting(participant2, meetUrl.getRoomName());
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
participant1.getToolbar().clickMessageButton();
participant1.getToolbar().clickMessageUpdateButton();
retValue = retValue &&
participant2.getMeetingTypesOptions().checkMessageMeettingOwnerAvailable();
retValue = retValue &&
participant1.getParticipantPanel().validatePartipiantCount("1");

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status" +


retValue);

participant1.getParticipantPanel().clickAdmitAllButton(participant2.getName());
passwordProtectedPage(password, participant2);
wait = new WebDriverWait(participant2.getDriver(), 90);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
if (!
participant2.getParticipantPanel().isParticpiantPanelDisplayed())

participant2.getToolbar().clickCheckParticipantViewButton();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2);
retValue = retValue &&
participant1.getParticipantPanel().validateRolesWaitingList(plist);
retValue = retValue &&
participant2.getParticipantPanel().validateRoles(plist);

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status" +


retValue);

retry = false;

} catch (Exception x) {
System.out.println("exception confidential waiting list");
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 12)
public void ColloborativeMeetingWaitingList() {
// SAME-T2374, SAME-T2399,SAME-T2415
Boolean retValue = true;
participant2 = null;
participant1 = null;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 5);
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickcheckModeratedCheckbox();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGROOM.getMeetingType());
configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
joinExistingMeeting(participant2, meetUrl.getRoomName());

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
wait = new WebDriverWait(participant2.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();

participant1.getParticipantPanel().clickpanelMoreactionButton(participant2.getName(
));

participant1.getParticipantPanel().clicparticpiantMakeModeratorJS(participant2.getN
ame());
if (!
participant2.getParticipantPanel().isParticpiantPanelDisplayed())

participant2.getToolbar().clickParticipantViewButtonJS();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2);
retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
retValue = retValue &&
participant2.getParticipantPanel().validateRoles(plist);

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();

Assert.assertTrue(retValue);

@Test(priority = 13)
public void LectureStyleMeetingWaitingList() {
// SAME-T2415
Boolean retValue = true;
participant2 = null;
participant1 = null;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 16);
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickLectureStyleMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickCheckWaitingRoomCheckbox();
addManageMemberFunctionality("susan adams17");
startMeetingWithPassword(password,participant1);
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);

targetOptions2.setRole(RollType.AUTHENTICATED.getRollType());

targetOptions2.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOM.getMeetingTyp
e());
configPrefix = getUsernamePrefix() + 17;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status " +


retValue);
joinExistingMeeting(participant2, meetUrl.getRoomName());
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
participant1.getToolbar().clickMessageButton();
participant1.getToolbar().clickMessageUpdateButton();
retValue = retValue &&
participant2.getMeetingTypesOptions().checkMessageMeettingOwnerAvailable();
retValue = retValue &&
participant1.getParticipantPanel().validatePartipiantCount("1");

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status " +


retValue);

participant1.getParticipantPanel().clickAdmitAllButton(participant2.getName());
passwordProtectedPage(password, participant2);
wait = new WebDriverWait(participant2.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status " +


retValue);
retry = false;
}

catch (Exception x) {
System.out.println("exception got in the new item");
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();

Assert.assertTrue(retValue);

@Test(priority = 14)
public void ColloborativeMeetingChangeSettings() {
// SAME-T2374, SAME-T2399,SAME-T2415
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 8);
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGROOM.getMeetingType());
configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
joinExistingMeeting(participant2, meetUrl.getRoomName());
TestUtils.waitMillis(3000);

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
wait = new WebDriverWait(participant2.getDriver(), 90);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickSettings();

participant1.getSettingsActions().clickCheckWaitingRoomcheckBox();

participant1.getSettingsActions().clickSettingDialogOkButton();
retValue = retValue &&
participant1.getParticipantPanel().checkWaitingLabel();
retValue = retValue &&
participant1.getParticipantPanel().checkAttendingLabel();
retValue = retValue &&
participant1.getParticipantPanel().checkAttendingCount("2");

if (!
participant2.getParticipantPanel().isParticpiantPanelDisplayed())

participant2.getToolbar().clickCheckParticipantViewButton();
retValue = retValue &&
participant2.getParticipantPanel().checkWaitingLabel();
retValue = retValue &&
participant2.getParticipantPanel().checkAttendingLabel();
retValue = retValue &&
participant2.getParticipantPanel().checkAttendingCount("2");

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 15)
public void DeafultSametimeMeetingTest() {
// SAME-T2416
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String password =
ConfigurationManager.instance().getProperties().get("password");
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
JitsiMeetUrl meetURL = getJitsiMeetUrl();
String roomName = "MeetMe.bjGrHITDzRJAxDT771Uf81";
meetURL = Objects.requireNonNull(meetURL, "meetURL");
String meetingName = "Sametime Meeting Room";
if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

int retryCount = 0;
boolean retry = true;
while (retry) {
try {

this.participant1 =
participants.createParticipant(configPrefix, targetOptions2);
participant1.getDriver().get(URL);
loginMeeting(participant1, meetURL.getServerUrl(),
password, false, false);

this.participant1.getMeetingTypesOptions().clickMeetingUrlLink(meetingName);
String roomNamePaticpiant =
this.participant1.getStartedOptions().getMeetingname();

this.participant1.getStartedOptions().clickstartMeetingButton();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGROOM.getMeetingType());
configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetURL.getServerUrl());
loginMeeting(participant2, meetURL.getServerUrl(),
password, false, false);
joinExistingMeeting(participant2, roomNamePaticpiant);
this.participant2.getStartedOptions().clickstartMeetingButton();
wait = new WebDriverWait(participant2.getDriver(), 90);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();
retValue = retValue &
participant1.getStartedOptions().checkStartedButton();
System.out.println(retValue);

participant1.getMeetingTypesOptions().clickrecentTabButton();

participant1.getMeetingTypesOptions().checkRecentMeetingsList();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRecentMeetingName(meetingName);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 16)
public void meetingWithsameParticpiants() {
// SAME-T1052 (1.0),SAME-T2152 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 5);
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPENWAITINGROOM.getMeetingType());
configPrefix = getUsernamePrefix() + 5;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
joinExistingMeeting(participant2, meetUrl.getRoomName());

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
wait = new WebDriverWait(participant2.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickParticipantViewButtonJS();

participant1.getParticipantPanel().clickpanelMoreactionButton(participant2.getName(
), 1);
retValue = retValue
&
participant1.getParticipantPanel().particpiantKickOutpresnetInversion(participant2.
getName());
if (!
participant2.getParticipantPanel().isParticpiantPanelDisplayed())

participant2.getToolbar().clickParticipantViewButtonJS();

participant2.getParticipantPanel().clickpanelMoreactionButton(participant1.getName(
), 1);
retValue = retValue
&
participant1.getParticipantPanel().particpiantKickOutpresnet(participant1.getName()
);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
participant1.getMoreActions().clickEndMeetingCloseButton();
retValue = retValue &
participant1.getStartedOptions().checkStartedButton();
participant1.getStartedOptions().getStartedbtnClick();

participant1.getStartedOptions().clickCreateMeetingOption();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();

participant1.getMeetingTypesOptions().EnterMeetingNameText(meetingName);

participant1.getMeetingTypesOptions().clickConfidentialMenu();
retValue = retValue &
participant1.getStartedOptions().checkMeetingAlreadyExistsText();
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();

Assert.assertTrue(retValue);

@Test(priority = 17)
public void meetingeditCopyDelete() {
// SAME-T1052 (1.0),SAME-T2152 (1.0),SAME-T818 (1.0),SAME-T824 (1.0)
Boolean retValue = true;
participant2 = null;
participant1 = null;
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 4);
launchPreJoinPageWithouLastMeeting(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingEditButton(0);
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingCopyButton(0);
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingDeleteButton(0);
retValue &=
participant1.getMeetingTypesOptions().checkMeetingNamevalidation(meetingName);
System.out.println(retValue);

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status" +


retValue);
WebElement editElem =
participant1.getMeetingTypesOptions().retriveEditButton(0);
participant1.javaScriptAction(editElem,
"arguments[0].click()");

participant1.getMeetingTypesOptions().clickCheckEditMeetingPassword();

participant1.getMeetingTypesOptions().EnterEditMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickSavepasswordChangedButton();
WebElement deleteElem =
participant1.getMeetingTypesOptions().retriveDeleteButton(0);
participant1.javaScriptAction(deleteElem,
"arguments[0].click()");
retValue &=
participant1.getMeetingTypesOptions().waitforMeetingdeleted();
System.out.println(retValue);

ReportingManager.instance().getExtenttest().log(Status.INFO, "Step status " +


retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");
retryCount+=1;
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 18)
public void meetinPrejoinCameraValidate() {
// SAME-T2463 (1.0)
Boolean retValue = true;
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);

WebParticipantOptions targetOptions2 = new WebParticipantOptions();


WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
// validate UI elements of confidential meeting menu
String meetingName = getMeetingName();
launchPreJoinPage(targetOptions1,configPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");

JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);


participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickSaveAndCopyMeetingLink();
retValue &=
participant1.getMeetingTypesOptions().checkMeetingNamevalidation(meetingName);
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingEditButton(0);
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingCopyButton(0);
retValue &=
participant1.getMeetingTypesOptions().checkMyMeetingDeleteButton(0);
System.out.println(retValue);
WebElement editElem =
participant1.getMeetingTypesOptions().retriveEditButton(0);
participant1.click(editElem);

participant1.getMeetingTypesOptions().clickCheckEditMeetingPassword();

participant1.getMeetingTypesOptions().EnterEditMeetingPasswrodText(password);

participant1.getMeetingTypesOptions().clickSavepasswordChangedButton();
WebElement deleteElem =
participant1.getMeetingTypesOptions().retriveDeleteButton(0);
participant1.click(deleteElem);

participant1.getMeetingTypesOptions().waitforMeetingdeleted();
retValue &= !
participant1.getMeetingTypesOptions().checkMeetingNamevalidation(meetingName);
System.out.println(retValue);

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
cleanupClass();
Assert.assertTrue(retValue);

@Test(priority = 19)
public void PreJoinPagemeetingRecordingTabValidation() {
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
String checkLastMeeting = "";
targetOptions1.setRole(RollType.OWNER.getRollType());
targetOptions2.setRole(RollType.MODERATOR.getRollType());
targetOptions3.setRole(RollType.GUEST.getRollType());
String meetingName = getMeetingName();
launchPreJoinPageForOwner(targetOptions1);
launchPreJoinPageForModerator(targetOptions2);
launchPreJoinPageForGuest(targetOptions3);
String password =
ConfigurationManager.instance().getProperties().get("password");

participant1.getMeetingTypesOptions().clickrecentTabButton();

retValue = retValue &


participant1.getStartedOptions().checkRecentTab_1();

System.out.println(retValue);

participant2.getMeetingTypesOptions().clickrecentTabButton();

retValue = retValue &


participant2.getStartedOptions().checkRecentTab_1();

System.out.println(retValue);

retValue = retValue &


participant3.getStartedOptions().checkRecentTab_1();

System.out.println(retValue);

participant1.getStartedOptions().clickRecentOverflowButton();

participant1.getStartedOptions().clickRemoveTab();

retValue = retValue &&


(participant1.getStartedOptions().checkRemoveMeetingDailogBox());

System.out.println(retValue);

participant1.getStartedOptions().clickOkButton();

retValue = retValue &&


participant1.getStartedOptions().checkRecordingTab();
System.out.println(retValue);
participant1.getStartedOptions().clickRecordingButton();

retValue = retValue &&


participant2.getStartedOptions().checkRecordingTab();
System.out.println(retValue);
participant2.getStartedOptions().clickRecordingButton();

retValue = retValue && !


(participant3.getStartedOptions().checkRecordingTab());
System.out.println(retValue);

participant1.getStartedOptions().clickRecordingPlayOption();

participant1.getDriver().navigate().back();

retValue = retValue &


participant1.getStartedOptions().checkRecordingTab();
System.out.println(retValue);

retValue = retValue &


participant2.getStartedOptions().checkRecordingTab();
System.out.println(retValue);

retValue = retValue & !


(participant3.getStartedOptions().checkRecordingTab());
System.out.println(retValue);

participant1.getStartedOptions().clickRenameOverflowButton();

participant1.getStartedOptions().clickRenameTab_1();

participant1.getStartedOptions().clearInputField(participant1.getStartedOptions().r
enameRecordingName);

participant1.getStartedOptions().enterTextValue(participant1.getStartedOptions().re
nameRecordingText, "Meeting Name is replaced by some other name");

Assert.assertEquals(true,participant1.getStartedOptions().checkElementEnabled(parti
cipant1.getStartedOptions().renameRecordingButtonEnabled));
participant1.getStartedOptions().clickCancelButton();
System.out.println(retValue);
closeParticipant(participant1);
closeParticipant(participant2);
closeParticipant(participant3);
Assert.assertTrue(retValue);

@Test(priority = 29)
public void PreJoinPagemeetingRecentTabValidation() {

Boolean retValue = true;


WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant2,meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant2.getMeetingTypesOptions().checkJoinMeetingButton();

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 180);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();

targetOptions3.setRole(RollType.GUEST.getRollType());

targetOptions3.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix3 = getUsernamePrefix() + 3;
this.participant3 =
participants.createParticipant(configPrefix3, targetOptions3);
participant3.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant3.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeetingForGuest(participant3,meetUrl.getServerUrl(), false, false);
participant3.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant3.getMeetingTypesOptions().checkJoinMeetingButton();

participant3.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait3 = new
WebDriverWait(participant3.getDriver(), 180);

wait3.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant3.getDriver(), false);
retValue = retValue &&
participant3.getToolbar().checkHangUp();

if (!
participant1.getMoreActions().checkmoreActions_Open())
participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();

participant1.getMoreActions().clickEndMeetingCloseButton();
participant2.getMoreActions().clickEndMeetingCloseButton();
participant3.getMoreActions().clickEndMeetingCloseButton();

participant1.getMeetingTypesOptions().clickrecentTabButton();

retValue = retValue &


participant1.getStartedOptions().checkRecentTab_1();
System.out.println(retValue);
participant1.getStartedOptions().clickRecentOverflowButton();

participant1.getStartedOptions().clickRemoveTab();

retValue = retValue &&


(participant1.getStartedOptions().checkRemoveMeetingDailogBox());
System.out.println(retValue);
participant1.getStartedOptions().clickOkButton();

participant2.getMeetingTypesOptions().clickrecentTabButton();

retValue = retValue &


participant2.getStartedOptions().checkRecentTab_1();
System.out.println(retValue);

participant2.getStartedOptions().clickRecentOverflowButton();

participant2.getStartedOptions().clickRemoveTab();

retValue = retValue && !


(participant2.getStartedOptions().checkRemoveMeetingDailogBox());
System.out.println(retValue);

participant3.getMeetingTypesOptions().clickrecentTabButton();
retValue = retValue &
participant3.getStartedOptions().checkRecentTab_1();
System.out.println(retValue);

retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
closeParticipant(participant3);

Assert.assertTrue(retValue);

@Test(priority = 20)
public void ColloborativeAddingOfflineUserAsModerator() {
// SAME-T1861 SAME-T1930
Boolean retValue = true;

WebParticipantOptions targetOptions1 = new WebParticipantOptions();


WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
WebParticipantOptions targetOptions4 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant2,meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant2.getMeetingTypesOptions().checkJoinMeetingButton();

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 180);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();
targetOptions3.setRole(RollType.GUEST.getRollType());

targetOptions3.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix3 = getUsernamePrefix() + 3;
this.participant3 =
participants.createParticipant(configPrefix3, targetOptions3);
participant3.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant3.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeetingForGuest(participant3,meetUrl.getServerUrl(), false, false);
participant3.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant3.getMeetingTypesOptions().checkJoinMeetingButton();

participant3.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait3 = new
WebDriverWait(participant3.getDriver(), 180);

wait3.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant3.getDriver(), false);
retValue = retValue &&
participant3.getToolbar().checkHangUp();

if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickCheckParticipantViewButton();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2, participant3);
retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
System.out.println(retValue);
if
(participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickCheckParticipantViewButton();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
retValue = retValue &
participant1.getSettingsActions().checkDeviceSettingstab();
if (!
participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();
addManageMemberFunctionalityInSettings("Susan Adams4");
participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams4");

participant1.getSettingsActions().clickOnBackToSettingsButton();

participant1.getSettingsActions().clickSettingDialogOkButton();
System.out.println(retValue);

targetOptions4.setRole(RollType.MODERATOR.getRollType());

targetOptions4.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix4 = getUsernamePrefix() + 4;
this.participant4 =
participants.createParticipant(configPrefix4, targetOptions4);
participant4.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant4.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant4,meetUrl.getServerUrl(), password, false, false);
participant4.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant4.getMeetingTypesOptions().checkJoinMeetingButton();

participant4.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait4 = new
WebDriverWait(participant4.getDriver(), 180);

wait4.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant4.getDriver(), false);
retValue = retValue &&
participant4.getToolbar().checkHangUp();
System.out.println(retValue);
if (!
participant4.getParticipantPanel().isParticpiantPanelDisplayed())

participant4.getToolbar().clickCheckParticipantViewButton();
retValue = retValue &
participant4.getParticipantPanel().hasLockMeetingButton();
System.out.println(20);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

System.out.println("failed at
ColloborativeAddingOfflineUserAsModerator");
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
closeParticipant(participant3);
closeParticipant(participant4);
Assert.assertTrue(retValue);

@Test(priority = 21)
public void ModeratorNamesDisplayingInSettingsManageMembers() {
// Manage Access
// SAME-T1895 SAME-T2015 SAME-T1537
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
WebParticipantOptions targetOptions4 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOM.getMeetingTyp
e());
String configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant2,meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant2.getMeetingTypesOptions().checkJoinMeetingButton();

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 180);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();

targetOptions3.setRole(RollType.AUTHENTICATED.getRollType());

targetOptions3.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOM.getMeetingTyp
e());
String configPrefix3 = getUsernamePrefix() + 3;
this.participant3 =
participants.createParticipant(configPrefix3, targetOptions3);
participant3.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant3.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant3,meetUrl.getServerUrl(), password, false, false);
participant3.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant3.getMeetingTypesOptions().checkJoinMeetingButton();

participant3.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait3 = new
WebDriverWait(participant3.getDriver(), 180);

wait3.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant3.getDriver(), false);
retValue = retValue &&
participant3.getToolbar().checkHangUp();

targetOptions4.setRole(RollType.GUEST.getRollType());

targetOptions4.setMeetingType(MeetingType.CONFIDENTIALWITHWAITINGROOM.getMeetingTyp
e());
String configPrefix4 = getUsernamePrefix() + 4;
this.participant4 =
participants.createParticipant(configPrefix4, targetOptions4);
participant4.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant4.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeetingForGuest(participant4,meetUrl.getServerUrl(), false, false);
participant4.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant4.getMeetingTypesOptions().checkJoinMeetingButton();

participant4.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait4 = new
WebDriverWait(participant4.getDriver(), 180);

wait4.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant4.getDriver(), false);
retValue = retValue &&
participant4.getToolbar().checkHangUp();
System.out.println(retValue);

if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickCheckParticipantViewButton();

participant1.getParticipantPanel().clickpanelMoreactionButton(participant2.getName(
));

participant1.getParticipantPanel().participiantMakeModeratorClick(participant2.getN
ame());
List<WebParticipant> plist = Arrays.asList(participant1,
participant2, participant3, participant4);
retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
System.out.println(retValue);
if
(participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickCheckParticipantViewButton();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
retValue = retValue &
participant1.getSettingsActions().checkDeviceSettingstab();
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();
participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams2");

participant1.getSettingsActions().clickOnBackToSettingsButton();
addManageMemberFunctionalityInSettings("Susan Adams3");

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams3");

participant1.getSettingsActions().clickOnBackToSettingsButton();

participant1.getSettingsActions().clickSettingDialogOkButton();
System.out.println(retValue);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams2");
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams3");
System.out.println(retValue);

participant1.getSettingsActions().clickOnBackToSettingsButton();

// SAME-T1537
if
(participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
participant1.getSettingsActions().clickContinueButton();
if (!
participant1.getSettingsActions().isTextBoxMeetingPasswordselectd())

participant1.getSettingsActions().clickCheckMeetingPassword();
participant1.getParticipantPanel().clickInfoButton();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
participant1.getSettingsActions().clickCancelButtonInSettingsDialog();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
System.out.println(retValue);

participant1.getSettingsActions().clickSettingDialogOkButton();
TestUtils.waitMillis(500);
retValue = retValue & !
participant1.getSettingsActions().checkMeetingsTab();
System.out.println(21);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
closeParticipant(participant3);
closeParticipant(participant4);
Assert.assertTrue(retValue);

@Test(priority = 22)
public void CollaborativeManageAccessTestCases() {
// SAME-T2266
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
retValue = retValue &
checkManageMembersBtnInPreJoinIsEnabled();
addManageMemberFunctionality("Susan Adams4");
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant2,meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant2.getMeetingTypesOptions().checkJoinMeetingButton();

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 180);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();

if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkModeratedMeetingSelected();
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams4");

participant1.getSettingsActions().clickBackToSettingsButton();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams5");
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams5");

participant1.getSettingsActions().clickOnSaveModeratorsButton();

participant1.getSettingsActions().clickSettingDialogOkButton();
if (!
participant1.getParticipantPanel().isParticpiantPanelDisplayed())

participant1.getToolbar().clickCheckParticipantViewButton();

participant1.getParticipantPanel().clickpanelMoreactionButton(participant2.getName(
));

participant1.getParticipantPanel().participiantMakeModeratorClick(participant2.getN
ame());
if (!
participant2.getParticipantPanel().isParticpiantPanelDisplayed())

participant2.getToolbar().clickCheckParticipantViewButton();
List<WebParticipant> plist = Arrays.asList(participant1,
participant2);
retValue = retValue &&
participant1.getParticipantPanel().validateRoles(plist);
System.out.println(22);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
Assert.assertTrue(retValue);

@Test(priority = 23)

public void ManageMembersTestCasesInPreJoinPage() {


// Manage Access
// SAME-2294, SAME-T2014
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());

targetOptions1.setMeetingType(MeetingType.OPEN.getMeetingType());
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);

retValue = retValue &


participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();

// collaboration meeting
participant1.getMeetingTypesOptions().clickColloborationMenu();
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
retValue = retValue & checkManageMembersBtnInPreJoinIsEnabled();
addManageMemberFunctionalityInPreJoinPage("Susan Adams4");
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Moderators");
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams4");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
if
(participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
participant1.getMeetingTypesOptions().clickContinueButton();
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
retValue = retValue & checkManageMembersBtnInPreJoinIsEnabled();
addManageMemberFunctionalityInPreJoinPage("Susan Adams5");
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Participants");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams5");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
if
(participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
participant1.getMeetingTypesOptions().clickContinueButton();

if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
retValue = retValue & checkManageMembersBtnInPreJoinIsEnabled();
addManageMemberFunctionalityInPreJoinPage("Susan Adams6");
addManageMemberFunctionalityInPreJoinPage("Susan Adams7");
addManageMemberFunctionalityInPreJoinPage("Susan Adams8");
addManageMemberFunctionalityInPreJoinPage("Susan Adams9");
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Users");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams6");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams7");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams8");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams9");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams6",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams7",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams8",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams9",
"Participant");
participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams6");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();
participant1.getSettingsActions().clickModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams6",
"Moderator");
participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams9");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();
participant1.getSettingsActions().clickModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams9",
"Moderator");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembers();
int manageMembersCount1 =
participant1.getMeetingTypesOptions().getManageMembersCount();
retValue = retValue && participant1.validateText(manageMembersCount1,
4);
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorParticipantOrder("Susan Adams6",
"Susan Adams9", "Susan Adams7", "Susan Adams8");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams6");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams8");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue & !
participant1.getSettingsActions().checkModeratorName("Susan Adams6");
retValue = retValue & !
participant1.getSettingsActions().checkParticipantName("Susan Adams8");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkManageMembers();
int manageMembersCount2 =
participant1.getMeetingTypesOptions().getManageMembersCount();
retValue = retValue && participant1.validateText(manageMembersCount2,
2);
addManageMemberFunctionality("Susan Adams6");
addManageMemberFunctionality("Susan Adams8");
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams6");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams7");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams8");
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams9");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
if
(participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
participant1.getMeetingTypesOptions().clickContinueButton();
if
(participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
participant1.getMeetingTypesOptions().clickContinueButton();

// confidential meeting
participant1.getMeetingTypesOptions().clickConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBox();
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
retValue = retValue & checkManageMembersBtnInPreJoinIsEnabled();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams5");
participant1.getSettingsActions().clickOnManageMembersDialogBox();
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams6");
participant1.getSettingsActions().clickOnManageMembersDialogBox();
participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams5");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();
participant1.getSettingsActions().clickModeratorOptionInDropDown();
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams5");
retValue = retValue &
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams6");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams5");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams6");
retValue = retValue & !
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams5");
retValue = retValue & !
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams6");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();

// lecture meeting
participant1.getMeetingTypesOptions().clickLectureStyleMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkModeratedChecBox();
retValue = retValue &
participant1.getMeetingTypesOptions().checkRestrictedCheckBox();
if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {

participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
retValue = retValue & checkManageMembersBtnInPreJoinIsEnabled();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams5");
participant1.getSettingsActions().clickOnManageMembersDialogBox();
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams6");
participant1.getSettingsActions().clickOnManageMembersDialogBox();
participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams5");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();
participant1.getSettingsActions().clickModeratorOptionInDropDown();
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();
participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams5");
retValue = retValue &
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams6");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams5");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams6");
retValue = retValue & !
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams5");
retValue = retValue & !
participant1.getMeetingTypesOptions().checkParticipantName("Susan Adams6");
participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
System.out.println(23);
System.out.println(retValue);
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 24)
public void CollaborativeSpeakerIconAndFlipOptionTestCases() {
// SAME-T835 SAME-T2304
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);
wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();

targetOptions2.setRole(RollType.MODERATOR.getRollType());

targetOptions2.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeeting(participant2,meetUrl.getServerUrl(), password, false, false);
participant2.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant2.getMeetingTypesOptions().checkJoinMeetingButton();

participant2.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait2 = new
WebDriverWait(participant2.getDriver(), 180);

wait2.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferen
ceFrame0")));
TestUtils.switchToIframe(participant2.getDriver(), false);
retValue = retValue &&
participant2.getToolbar().checkHangUp();
//retValue = retValue &&
participant1.getToolbar().checkSpeakerIcon();
TestUtils.switchToIframe(participant1.getDriver(), true);
retValue = retValue &
participant1.getSettingsActions().checkLocalMenu();
retValue = retValue &
participant1.getSettingsActions().checkRemoteMenu();

participant1.getSettingsActions().clickOnLocalPopoverTrigger();
retValue = retValue &
participant1.getSettingsActions().checkFlipOptionForLocal();

participant1.getSettingsActions().clickOnRemotePopoverTrigger();
retValue = retValue &
participant1.getSettingsActions().checkMuteOptionForRemote();
System.out.println(24);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
Assert.assertTrue(retValue);

@Test(priority = 25)
public void RemovingAllMeetingsInRecentTabTestCases() {
// SAME-T2329 SAME-T2223
Boolean retValue = true;
try {
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 15);
launchPreJoinPageForSpecificUser(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
participant1.getStartedOptions().clickdropDown_btn();
retValue = retValue &
participant1.getStartedOptions().checkSettingsOption();
participant1.getStartedOptions().clickSettingsOption();
retValue = retValue &
participant1.getStartedOptions().checkCameraLabelText();
retValue = retValue &
participant1.getStartedOptions().checkMicrophoneLabelText();
participant1.getStartedOptions().clickSettingsOKOption();
// SAME-T808
retValue = retValue &
participant1.getMeetingTypesOptions().checkRecentTab();
participant1.getMeetingTypesOptions().clickrecentTabButton();
if(!participant1.getMeetingTypesOptions().checkNoRecentMeetingsLabel()) {
participant1.getStartedOptions().deleteAllMeetingsInRecentTab();
}
//participant1.getStartedOptions().deleteAllMeetingsInRecentTab();
retValue = retValue &
participant1.getMeetingTypesOptions().checkNoRecentMeetingsLabel();
System.out.println(25);
System.out.println(retValue);
closeParticipant(participant1);
}
catch(Exception ex) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

}
Assert.assertTrue(retValue);

}
@Test(priority = 26)
public void ManageMembersTestCasesInSettingsPage() {
// SAME-2294, SAME-T2302
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 15);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int clickRetry = 0;
int retryCount = 0;
boolean skip = false;
boolean retry = true;
while (retry) {
try {
retValue = retValue & checkStartButtonIsEnabled();
startMeeting();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();

if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
retValue = retValue &
participant1.getSettingsActions().checkDeviceSettingstab();
if (!
participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();
addManageMemberFunctionalityInSettings("Susan Adams4");

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Moderators");
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams4");

participant1.getSettingsActions().clickOnBackToSettingsButton();
if
(participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
participant1.getSettingsActions().clickContinueButton();
if (!
participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
participant1.getSettingsActions().clickContinueButton();
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();
addManageMemberFunctionalityInSettings("Susan Adams5");

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Participants");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams5");

participant1.getSettingsActions().clickOnBackToSettingsButton();
if
(participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
participant1.getSettingsActions().clickContinueButton();

if (!
participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
if (!
participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
participant1.getSettingsActions().clickContinueButton();
retValue = retValue &
checkManageMembersBtnInSettingsIsEnabled();
addManageMemberFunctionalityInSettings("Susan Adams6");
addManageMemberFunctionalityInSettings("Susan Adams7");
addManageMemberFunctionalityInSettings("Susan Adams8");
addManageMemberFunctionalityInSettings("Susan Adams9");

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkUserTypeInManageMembers("Users");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams6");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams7");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams8");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams9");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams6",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams7",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams8",
"Participant");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams9",
"Participant");

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams6");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();

participant1.getSettingsActions().clickModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams6",
"Moderator");

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams9");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();

participant1.getSettingsActions().clickModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams9",
"Moderator");

participant1.getSettingsActions().clickOnSaveModeratorsButton();
int manageMembersCount1 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount1, 4);

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorParticipantOrder("Susan Adams6",
"Susan Adams9", "Susan Adams7", "Susan Adams8");
// SAME-2302

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams6");

participant1.getSettingsActions().clickParticipantOptionInDropDown();

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams7");

participant1.getSettingsActions().clickModeratorOptionInDropDown();

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams8");

participant1.getSettingsActions().clickModeratorOptionInDropDown();

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams9");

participant1.getSettingsActions().clickParticipantOptionInDropDown();

participant1.getSettingsActions().clickOnSaveModeratorsButton();
int manageMembersCount2 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount2, 4);

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();

participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams5");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams5");

participant1.getSettingsActions().clickOnSaveModeratorsButton();
int manageMembersCount3 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount3, 5);
participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams6");

participant1.getSettingsActions().clickDeleteButtonInManageMembers("Susan
Adams8");

participant1.getSettingsActions().clickOnSaveModeratorsButton();
int manageMembersCount4 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount4, 3);

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams6");

participant1.getMeetingTypesOptions().adduserToManageMemebers("Susan
Adams8");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams6");
retValue = retValue &
participant1.getSettingsActions().checkParticipantName("Susan Adams8");

participant1.getSettingsActions().clickOnSaveModeratorsButton();
if
(participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
participant1.getSettingsActions().clickContinueButton();
if
(participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
participant1.getSettingsActions().clickContinueButton();

participant1.getSettingsActions().clickSettingDialogOkButton();

// SAME-T2007 MeetingsListInRecentTabTestCases

participant1.getToolbar().clickHangUp();
participant1.getMoreActions().clickEndMeetingCloseButton();
retValue = retValue &&
participant1.getMeetingTypesOptions().checkRecentTab();
participant1.getMeetingTypesOptions().clickrecentTabButton();

participant1.getStartedOptions().deleteFirstMeetingInRecentTab();
retValue = retValue &
participant1.getMeetingTypesOptions().checkNoRecentMeetingsLabel();
System.out.println(26);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 27)
public void WarningDialogByUncheckingModeratorAndRestrictedInSettings() {
// SAME-T2531
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

if (!
participant1.getMeetingTypesOptions().checkModeratedChecBoxisSelected()) {

participant1.getMeetingTypesOptions().clickModeratedChecBoxisSelected();
}
if (!
participant1.getMeetingTypesOptions().checkRestrictedCheckBoxIsSelected()) {
participant1.getMeetingTypesOptions().clickcheckRestrictedCheckboxWithouValidation(
);
}
retValue = retValue &
checkManageMembersBtnInPreJoinIsEnabled();
addManageMemberFunctionality("susan adams2");
addManageMemberFunctionality("susan adams3");
participant1.getMeetingTypesOptions().clickManageMembers();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();

participant1.getSettingsActions().clickParticipantDropDownButton("Susan
Adams2");
retValue = retValue &
participant1.getSettingsActions().checkModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantOptionInDropDown();

participant1.getSettingsActions().clickModeratorOptionInDropDown();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams2",
"Moderator");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams3",
"Participant");

participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
retValue = retValue & checkStartButtonIsEnabled();
//startMeeting();

participant1.getMeetingTypesOptions().clickStartButtonLabel();

if(participant1.getMeetingTypesOptions().checkContinueButton())

participant1.getMeetingTypesOptions().clickContinueButton();
meetingStart();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue &&
participant1.getToolbar().checkHangUp();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
// Unchecking Restricted box
retValue = retValue &
participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected();
if
(participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
retValue = retValue &
participant1.getSettingsActions().checkWarningDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkCancelButtonInWarningDialog();
retValue = retValue &
participant1.getSettingsActions().checkContinueButtonInWarningDialog();

participant1.getSettingsActions().clickCancelButtonInWarningDialog();
retValue = retValue &
participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams2",
"Moderator");
retValue = retValue &
participant1.getSettingsActions().checkParticipantDropDownButton("Susan Adams3",
"Participant");

participant1.getSettingsActions().clickOnBackToSettingsButton();
int manageMembersCount1 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount1, 2);
if
(participant1.getSettingsActions().checkRestrictedCheckBoxIsSelected()) {

participant1.getSettingsActions().clickcheckRestrictedCheckboxWithouValidation();
}
participant1.getSettingsActions().clickContinueButton();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue & !
participant1.getSettingsActions().checkParticipantName("Susan Adams3");

participant1.getSettingsActions().clickOnBackToSettingsButton();
int manageMembersCount2 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount2, 1);
// Unchecking Moderator box
retValue = retValue &
participant1.getSettingsActions().checkModeratedChecBoxisSelected();
if
(participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
retValue = retValue &
participant1.getSettingsActions().checkWarningDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkCancelButtonInWarningDialog();
retValue = retValue &
participant1.getSettingsActions().checkContinueButtonInWarningDialog();

participant1.getSettingsActions().clickCancelButtonInWarningDialog();
retValue = retValue &
participant1.getSettingsActions().checkModeratedChecBoxisSelected();

participant1.getSettingsActions().clickManageMembersButton();
retValue = retValue &
participant1.getSettingsActions().checkManageMembersDialogBox();

participant1.getSettingsActions().clickOnManageMembersDialogBox();
retValue = retValue &
participant1.getSettingsActions().checkModeratorName("Susan Adams2");

participant1.getSettingsActions().clickOnBackToSettingsButton();
int manageMembersCount3 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount3, 1);
if
(participant1.getSettingsActions().checkModeratedChecBoxisSelected()) {

participant1.getSettingsActions().clickModeratedChecBoxisSelected();
}
participant1.getSettingsActions().clickContinueButton();

participant1.getSettingsActions().clickSettingDialogOkButton();
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
(participant1.getMoreActions().checkSettings());
participant1.getMoreActions().clickSettings();
retValue = retValue &
participant1.getSettingsActions().checkMeetingsTab();
int manageMembersCount4 =
participant1.getSettingsActions().getManageMembersCount();
retValue = retValue &&
participant1.validateText(manageMembersCount4, 0);

participant1.getSettingsActions().clickSettingDialogOkButton();
TestUtils.waitMillis(500);
retValue = retValue & !
participant1.getSettingsActions().checkMeetingsTab();
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("exception in
WarningDialogByUncheckingModeratorAndRestrictedInSettings");
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 28)
public void ConfidentialMeetingDownloadRecordingsFromMyRecordings() {
// SAME-T2473
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickConfidentialMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);
retValue = retValue & checkStartButtonIsEnabled();
startMeetingWithPassword(password,participant1);
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue && participant1.getToolbar().checkHangUp();
if (!participant1.getMoreActions().checkmoreActions_Open())
participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &&
(participant1.getMoreActions().checkstartStopRecordingOption());
participant1.getMoreActions().clickStartRecording();

participant1.getMoreActions().clickStartRecordingDialogStartButton();
retValue = retValue &&
(participant1.getMoreActions().validateRecordingLabelOnBanner());
retValue = retValue &&
(participant1.getMoreActions().validateRecordingStartedtText());
if (!participant1.getMoreActions().checkmoreActions_Open())
participant1.getMoreActions().clickMoreActionsButton();
participant1.getMoreActions().clickStopRecording();

participant1.getMoreActions().clickStopRecordingDialogStopButton();
retValue = retValue &&
(participant1.getMoreActions().validateRecordingLabelOffBanner());
retValue = retValue &&
(participant1.getMoreActions().validateRecordingStoppedText());
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &&
(participant1.getMoreActions().hasEndMeetingOption());
participant1.getMoreActions().clickEndMeeting();
retValue = retValue &&
participant1.getMoreActions().checkEndMeetingDialogEndMeetingButton();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();
retValue = retValue &&
(participant1.getMoreActions().validateEndMeeting());
participant1.getMoreActions().clickEndMeetingCloseButton();
retValue = retValue &&
participant1.getMeetingTypesOptions().checkHomePageLabel();
participant1.getStartedOptions().clickRecordingButton();
TestUtils.waitMillis(5000);

participant1.getStartedOptions().clickRecoordingDownloadOption();
retValue = retValue & validateVideoDownload(meetingName);
System.out.println("fetched video download" + retValue);
System.out.println(28);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
System.out.println("Exception in
preJoineCollaborativeMeetingWithBypassAndWaitingRoom");

if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ",
unable to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 30)
public void VirtualBackgroundInPreJoinPageTestCases() {
// SAME-T2361 SAME-T2371 SAME-T2377 SAME-T2379 SAME-T2392 SAME-T2400
// SAME-T2424 SAME-T2309 SAME-T2311 SAME-T2312 SAME-T2318 SAME-T2319
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
participant1.getMeetingTypesOptions().clickColloborationMenu();
int retryCount = 0;
boolean retry = true;
while (retry) {
try {
retValue = retValue & checkStartButtonIsEnabled();

participant1.getMeetingTypesOptions().clickStartButtonLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkJoinMeetingButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkChangeBackgroundButton();

participant1.getMeetingTypesOptions().clickChangeBackgroundButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkVirtualBackgroundLabel();
retValue = retValue &
participant1.getMeetingTypesOptions().checkCustomBackgroundButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkDesktopSharingOptionDisabled();

participant1.getMeetingTypesOptions().clickOnThirdVirtualBackgroundImage();
retValue = retValue &
participant1.getMeetingTypesOptions().checkVirtualBackgroundPreviewArea();
if(checkApplyButtonIsEnabled()) {

participant1.getMeetingTypesOptions().clickApplyButtonInVirtualBackground();
}else {

participant1.getMeetingTypesOptions().clickCancelVirtualBackgroundButton();
}
retValue = retValue &
participant1.getMeetingTypesOptions().checkJoinMeetingButton();

participant1.getMeetingTypesOptions().clickJoinMeetingButton();
WebDriverWait wait = new
WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue && participant1.getToolbar().checkHangUp();

if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue &
participant1.getMoreActions().checkChangeBackgroundGreyedOut();
if (!participant1.getToolbar().chk_CameraOnStrip())
participant1.getToolbar().clickCameraButton();
retValue = retValue &
(participant1.getToolbar().chk_CameraOnStrip());
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue & !
participant1.getMoreActions().checkChangeBackgroundGreyedOut();
participant1.getMoreActions().clickChangeBackgroundButton();
retValue = retValue &
participant1.getMeetingTypesOptions().checkVirtualBackgroundLabel();
retValue = retValue &
participant1.getMoreActions().checkDesktopSharingOptionEnabled();
retValue = retValue &
participant1.getMeetingTypesOptions().checkVirtualBackgroundPreviewArea();

participant1.getMoreActions().clickOnSecondVirtualBackgroundImage();
retValue = retValue &
participant1.getMoreActions().checkChangeBackgroundPreviewAreaInMeeting();
retValue = retValue & checkApplyButtonIsEnabled();

participant1.getMeetingTypesOptions().clickApplyButtonInVirtualBackground();

if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickManageVideoQuality();

participant1.getMoreActions().slideVideoQualityBar(VideosQuality.HDTOAUDIO);;
participant1.getMoreActions().clickSaveButtonQuality();
retValue = retValue &
(participant1.getToolbar().checkCameraButtonDisabledAudioOnly());

if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickManageVideoQuality();

participant1.getMoreActions().slideVideoQualityBar(VideosQuality.AUDIOTOHD);
participant1.getMoreActions().clickSaveButtonQuality();
retValue = retValue &&
(participant1.getToolbar().unchk_CameraOnStrip());
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
retValue = retValue & !
participant1.getMoreActions().checkChangeBackgroundGreyedOut();
retValue = retValue &
participant1.getMoreActions().checkChangeBackgroundEnabled();
System.out.println(30);
System.out.println(retValue);
retry = false;
}

catch (Exception x) {
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 31)
public void PreJoinPageMeetingLandingPageValidation() {
// SAME-T2473
Boolean retValue = true;
WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting_1(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText(password);
retValue = retValue & checkStartButtonIsEnabled();
startMeetingWithPassword(password,participant1);

WebDriverWait wait = new


WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
TestUtils.switchToIframe(participant1.getDriver(), false);
retValue = retValue && participant1.getToolbar().checkHangUp();
System.out.println(retValue);
if (!participant1.getMoreActions().checkmoreActions_Open())

participant1.getMoreActions().clickMoreActionsViewButton();
participant1.getMoreActions().clickEndMeeting();

participant1.getMoreActions().clickEndMeetingDialogEndMeetingButton();

retry = false;
}

catch (Exception x) {
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ",
unable to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 32)
public void PreJoinPageMeetingLandingPageBackToHomePageFromLandingUI() {

Boolean retValue = true;


WebParticipantOptions targetOptions1 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
System.out.println(retValue);
System.out.println(meetingName);
System.out.println(meetUrl);

if (!
participant1.getMeetingTypesOptions().isTextBoxMeetingPasswordselectd())

participant1.getMeetingTypesOptions().clickCheckMeetingPassword();

participant1.getMeetingTypesOptions().EnterMeetingPasswrodText("12345678");
participant1.getMeetingTypesOptions().clickStartButtonLabel();
participant1.getMeetingTypesOptions().clickHclLogo();
retValue = retValue &&
participant1.getMeetingTypesOptions().checkHomePageLabel();
System.out.println(retValue);
closeParticipant(participant1);
Assert.assertTrue(retValue);

@Test(priority = 33)
public void
PreJoinPageMeetingLandingPageValidationMeetingInfoMessageForModAndGuest() {

Boolean retValue = true;

WebParticipantOptions targetOptions1 = new WebParticipantOptions();


WebParticipantOptions targetOptions2 = new WebParticipantOptions();
WebParticipantOptions targetOptions3 = new WebParticipantOptions();
targetOptions1.setRole(RollType.OWNER.getRollType());
String meetingName = getMeetingName();
String confPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
launchPreJoinPageWithouLastMeeting(targetOptions1,confPrefix);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checkConfidentialMenu();
retValue = retValue &
participant1.getMeetingTypesOptions().checLectureStyleMenu();
JitsiMeetUrl meetUrl = launchMeetingSection(meetingName);
int retryCount = 0;
boolean retry = true;
while (retry) {
try {

participant1.getMeetingTypesOptions().clickcheckModeratedCheckbox();
if
(participant1.getMeetingTypesOptions().checkAllowGuestsisSelected()) {

participant1.getMeetingTypesOptions().clickAllowGuestsCheckBox();
}

participant1.getMeetingTypesOptions().clickStartButtonLabel();
//participant1.getMeetingTypesOptions().clickJoinMeetingButton();

targetOptions2.setRole(RollType.AUTHENTICATED.getRollType());
String configPrefix1 = getUsernamePrefix() + 2;
this.participant2 =
participants.createParticipant(configPrefix1, targetOptions2);
participant2.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant2.getDriver().get(meetUrl.getServerUrl());
retValue = retValue & loginMeeting(participant2,
meetUrl.getServerUrl(), password, false, false);
System.out.println(retValue);
joinExistingMeeting(participant2, meetUrl.getRoomName());
retValue = retValue &&
participant2.getMeetingTypesOptions().checkMeetingHasnotStartedMessage();
System.out.println(retValue);
targetOptions3.setRole(RollType.GUEST.getRollType());

targetOptions3.setMeetingType(MeetingType.OPEN.getMeetingType());
String configPrefix3 = getUsernamePrefix() + 3;
this.participant3 =
participants.createParticipant(configPrefix3, targetOptions3);
participant3.executeScript("console.log('--- Will start
test:" + getClass().getSimpleName() + "')");
participant3.getDriver().get(meetUrl.getServerUrl());
retValue = retValue &
loginMeetingForGuest(participant3,meetUrl.getServerUrl(), false, false);
participant3.getDriver().get(meetUrl.getServerUrl()
+"/"+meetUrl.getRoomName());
retValue = retValue &
participant3.getMeetingTypesOptions().checkJoinMeetingButton();

participant3.getMeetingTypesOptions().clickJoinMeetingButton();

retValue = retValue &&


participant3.getMeetingTypesOptions().checkGuestsNotAllowedLabel();
System.out.println(retValue);

catch (Exception x) {
retry = false;
if (retryCount++ < 3) {
TestUtils
.print(participant1.getName() + ", unable
to login to meetings. Will retry: " + retryCount);
} else {
TestUtils.print(participant1.getName() + ", unable to
login to meetings. " + x);
retry = false;
}
}
}
closeParticipant(participant1);
closeParticipant(participant2);
closeParticipant(participant3);
Assert.assertTrue(retValue);
}

private void launchPreJoinPageWithouLastMeeting_1(WebParticipantOptions


targetOptions1,String prefix) {
String configPrefix = (!StringUtils.isEmpty(prefix))?
prefix:getUsernamePrefix() + (0 + getStartIndex() + 1);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant1 = participants.createParticipant(configPrefix,
targetOptions1);

participant1.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant1.getDriver().get(URL);

retValue = retValue && isLoginButtonAvailable(participant1);


System.out.println(retValue);

retValue = retValue && checkGuestUserButtonText(participant1);


System.out.println(retValue);

String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeeting(participant1, URL, password, true,
true);
participant1.getStartedOptions().getStartedbtnClick();

participant1.getStartedOptions().clickCreateMeetingOption();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
}

private boolean isLoginButtonAvailable(WebParticipant Partipiant) {


TestUtils.waitForElementByXPath(Partipiant.getDriver(),
"//button[@data-testid='submitButton'or @data-
testid='loginButton']", 60);
String loginButton =
Partipiant.getDriver().findElement(By.xpath(".//span[contains(text(),'Login')]")).g
etText();
if(loginButton != null) {
return true;
}
return false;
}

private boolean checkGuestUserButtonText(WebParticipant Partipiant) {


TestUtils.waitForElementByXPath(Partipiant.getDriver(),
"//button[@data-testid='submitButton'or @data-
testid='joinGuestBtn']", 60);
String actualText = "Join as a guest";
String ExpectedTest =
Partipiant.getDriver().findElement(By.xpath(".//span[contains(text(),'Join as a
guest')]")).getText();
if(actualText.equalsIgnoreCase(ExpectedTest)) {
return true;
}
return false;
}

private Boolean getchatValidation(WebParticipant participant1,WebParticipant


participant2,String text1, String text2) {
Boolean retValue = true;
participant1.getChatPanel().sendMessage(text1);
retValue = retValue &
participant1.getChatPanel().findMessageInChat(text1);
retValue = retValue &
participant2.getChatPanel().findMessageInChat(text1);
// mpoderator sends messages and verifies in all 2 chat panels
participant2.getChatPanel().sendMessage(text2);
retValue = retValue &
participant1.getChatPanel().findMessageInChat(text2);
retValue = retValue &
participant2.getChatPanel().findMessageInChat(text2);
return retValue;

private Boolean validateRecordingOptions(WebParticipant


participant1,WebParticipant participant2) {
Boolean retValue = true;
if (!participant1.getMoreActions().checkmoreActions_Open())
participant1.getMoreActions().clickMoreActionsButton();
retValue = retValue &&
(participant1.getMoreActions().checkstartStopRecordingOption());
participant1.getMoreActions().clickStartRecording();
participant1.getMoreActions().clickStartRecordingDialogStartButton();
// SAME-T750
chatIndex += 1;
// Wait until recording label is visible on banner
retValue = retValue &&
(participant1.getMoreActions().validateRecordingLabelOnBanner());
retValue = retValue &&
(participant2.getMoreActions().validateRecordingLabelOnBanner());
retValue = retValue &&
(participant1.getMoreActions().validateRecordingStartedtText());
retValue = retValue &&
(participant2.getMoreActions().validateRecordingStartedtText());

if (!participant1.getMoreActions().checkmoreActions_Open())
participant1.getMoreActions().clickMoreActionsButton();
participant1.getMoreActions().clickStopRecording();
participant1.getMoreActions().clickStopRecordingDialogStopButton();
// Wait until recording label is in-visible on banner
retValue = retValue &&
(participant1.getMoreActions().validateRecordingLabelOffBanner());
retValue = retValue &&
(participant2.getMoreActions().validateRecordingLabelOffBanner());
retValue = retValue &&
(participant1.getMoreActions().validateRecordingStoppedText());
retValue = retValue &&
(participant2.getMoreActions().validateRecordingStoppedText());
return retValue;
}

private Boolean validateRecordingOptions(WebParticipant participant) {


Boolean retValue = true;
if (!participant.getMoreActions().checkmoreActions_Open())
participant.getMoreActions().clickMoreActionsButton();
retValue = retValue &&
(participant.getMoreActions().checkstartStopRecordingOption());
participant.getMoreActions().clickStartRecording();
participant.getMoreActions().clickStartRecordingDialogStartButton();
// SAME-T750
chatIndex += 1;
// Wait until recording label is visible on banner
retValue = retValue &&
(participant.getMoreActions().validateRecordingLabelOnBanner());
retValue = retValue &&
(participant.getMoreActions().validateRecordingStartedtText());

if (!participant.getMoreActions().checkmoreActions_Open())
participant.getMoreActions().clickMoreActionsButton();
participant.getMoreActions().clickStopRecording();
participant.getMoreActions().clickStopRecordingDialogStopButton();
// Wait until recording label is in-visible on banner
retValue = retValue &&
(participant.getMoreActions().validateRecordingLabelOffBanner());
retValue = retValue &&
(participant.getMoreActions().validateRecordingStoppedText());
return retValue;
}

private void addManageMemberFunctionality(String user) {


this.participant1.getMeetingTypesOptions().clickManageMembers();
TestUtils.waitMillis(1000);

this.participant1.getMeetingTypesOptions().adduserToManageMemebers(user);
TestUtils.waitMillis(500);
this.participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
}

private void addManageMemberFunctionalityInPreJoinPage(String user) {


this.participant1.getMeetingTypesOptions().clickManageMembers();
this.participant1.getSettingsActions().checkManageMembersDialogBox();

this.participant1.getMeetingTypesOptions().adduserToManageMemebers(user);
this.participant1.getSettingsActions().clickOnManageMembersDialogBox();
this.participant1.getMeetingTypesOptions().clickBacktoSettingsButton();
}
private void addManageMemberFunctionalityInSettings(String user) {
this.participant1.getSettingsActions().checkManageMemeberButton();
this.participant1.getSettingsActions().clickManageMembersButton();
this.participant1.getSettingsActions().checkManageMembersDialogBox();

this.participant1.getMeetingTypesOptions().adduserToManageMemebers(user);
this.participant1.getSettingsActions().clickOnManageMembersDialogBox();

this.participant1.getSettingsActions().clikcSaveMderatorsButtonClicable();
}

private String launchPreJoinPage(WebParticipantOptions targetOptions1,String


prefix) {
String configPrefix = (!StringUtils.isEmpty(prefix))?
prefix:getUsernamePrefix() + (0 + getStartIndex() + 1);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant1 = participants.createParticipant(configPrefix,
targetOptions1);

participant1.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant1.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeeting(participant1, URL, password, true,
true);
List<WebElement> elemList =
participant1.getStartedOptions().getLastMeetingsList();
if (elemList.size() > 0) {
checkLastMeeting = elemList.get(0).getText();
}
participant1.getStartedOptions().getStartedbtnClick();
// TestUtils.waitMillis(500);
participant1.getStartedOptions().clickCreateMeetingOption();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
return checkLastMeeting;
}

private void launchPreJoinPageWithouLastMeeting(WebParticipantOptions


targetOptions1,String prefix) {
String configPrefix = (!StringUtils.isEmpty(prefix))?
prefix:getUsernamePrefix() + (0 + getStartIndex() + 1);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant1 = participants.createParticipant(configPrefix,
targetOptions1);

participant1.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant1.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeeting(participant1, URL, password, true,
true);
participant1.getStartedOptions().getStartedbtnClick();
// TestUtils.waitMillis(500);
participant1.getStartedOptions().clickCreateMeetingOption();
retValue = retValue &
participant1.getMeetingTypesOptions().checkColloborationMenu();
}

private boolean launchPreJoinPageForSpecificUser(WebParticipantOptions


targetOptions1, String userName) {
//String configPrefix = getUsernamePrefix() + (0 + getStartIndex() +
5);
String configPrefix = userName;
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
this.participant1 = participants.createParticipant(configPrefix,
targetOptions1);

participant1.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant1.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeeting(participant1,URL, password, true,
true);
return retValue;
}

private boolean loginMeeting(WebParticipant Partipiant, String URL, String


password, boolean isSuccess,
boolean retry) {
TestUtils.print("Login URL: " + URL);
WebElement joinElm = Partipiant.getMeetingTypesOptions().loginButton;
WebElement userName = Partipiant.getMeetingTypesOptions().userName;
WebElement submitButton =
Partipiant.getMeetingTypesOptions().submitButton;
WebElement passElemet =
Partipiant.getMeetingTypesOptions().passwordElement;

try {
TestUtils.waitForElementByXPath(Partipiant.getDriver(),
"//button[@data-testid='submitButton'or @data-
testid='loginButton']", 60);
Partipiant.waitFor(joinElm, 10, TimeUnit.SECONDS,
WAIT_FOR.CLICKABLE, null, true);
joinElm.click();
Partipiant.waitFor(userName, 5, TimeUnit.SECONDS,
WAIT_FOR.VISIBLE, null, true);
while (!userName.getAttribute("value").equals("")) {
userName.sendKeys(Keys.BACK_SPACE);
}
;
Partipiant.waitFor(userName, 5, TimeUnit.SECONDS,
WAIT_FOR.VISIBLE, null, true);
userName.sendKeys(Partipiant.getName());
Partipiant.waitFor(passElemet, 5, TimeUnit.SECONDS,
WAIT_FOR.VISIBLE, null, true);

while (!passElemet.getAttribute("value").equals("")) {
passElemet.sendKeys(Keys.BACK_SPACE);
}
;
TestUtils.waitMillis(500);
passElemet.click();
passElemet.clear();
passElemet.sendKeys(password);
Partipiant.waitFor(submitButton, 10, TimeUnit.SECONDS,
WAIT_FOR.CLICKABLE, null, true);
submitButton.click();
Boolean elem = Partipiant.waitForElement(
"//div[@data-testid='welcomeUser']", 10);
if (elem) {
return (!isSuccess ? true : false);
} else {
return (!isSuccess ? false : true);

}
} catch (NoSuchElementException | TimeoutException x) {

return (!isSuccess ? true : false);


}
}

private static String getDefaultConfig() {


String extraConfig = System.getProperty("extra.config", "");
if (Boolean.parseBoolean(System.getProperty("all.video.enabled",
"false")))
return DEFAULT_CONFIG + extraConfig +
"&config.startWithVideoMuted=false";

return DEFAULT_CONFIG + extraConfig;


}

private Boolean logOutfunctionality() {


Boolean retValue = true;
participant1.getStartedOptions().clickdropDown_btn();
participant1.getStartedOptions().clickOptionLogOut();
retValue = retValue
& participant1.waitForElement("//button[@data-
testid='submitButton'or @data-testid='loginButton']", 10);
System.out.println(retValue);
return retValue;
}

private String getMeetingName() {


Random rand = new Random();

// Generate random integers in range 0 to 999999


int rand_meetingNumber = rand.nextInt(10000000);
return String.valueOf("torture" + rand_meetingNumber);
}

private JitsiMeetUrl launchMeetingSection(String meetingName) {


JitsiMeetUrl meetURL = getJitsiMeetUrl();

participant1.getMeetingTypesOptions().EnterMeetingNameText(meetingName);
System.out.println(meetURL.getRoomName());
System.out.println(meetURL.getServerUrl());
JitsiMeetUrl newUrl = new JitsiMeetUrl();
newUrl.setServerUrl(meetURL.getServerUrl());
newUrl.setRoomName(meetingName);
return newUrl;
}

private void joinExistingMeeting(WebParticipant participant, String


meetingName) {
participant.getStartedOptions().getStartedbtnClick();
participant.getStartedOptions().clickJoiNExistingButton();
participant.getStartedOptions().inputJoinExistingInput(meetingName);
participant.getStartedOptions().waitForJoinButton();
participant.getStartedOptions().joinButton();
}

private void startMeeting() {


int i = 0;
do {
i += 1;
participant1.getMeetingTypesOptions().clickStartButtonLabel();
Boolean val =
participant1.getMeetingTypesOptions().checkJoinMeetingButton();
if (val)
break;
} while (i <= 3);

participant1.getMeetingTypesOptions().clickJoinMeetingButton();
}

private void startMeetingContinue() {


participant1.getMeetingTypesOptions().clickStartButtonLabel();
participant1.getMeetingTypesOptions().clickContinueButton();
participant1.getMeetingTypesOptions().checkJoinMeetingButton();
participant1.getMeetingTypesOptions().clickJoinMeetingButton();
}

private void startMeetingWithPassword(String meetingPassword,WebParticipant


particpiant) {
int i = 0;
do {
i += 1;
boolean val1
=particpiant.getMeetingTypesOptions().WaitclickStartButtonLabel();
if(!val1) {
File desti = new File("ErrorScreenshots",
"Failedscreenshot_errorPassword.png");

TakesScreenshot ts1 = (TakesScreenshot)


particpiant.getDriver();
File source1 = ts1.getScreenshotAs(OutputType.FILE);
System.out.println("destination" +
desti.getAbsolutePath());
try {
FileUtils.copyFile(source1, desti);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
particpiant.getMeetingTypesOptions().clickStartButtonLabel();
Boolean val = particpiant.waitForElement("//input[@data-
testid='password']", 5);
if (val)
break;
} while (i <= 3);
particpiant.getDriver().findElement(By.xpath("//input[@data-
testid='password']")).sendKeys(meetingPassword);
particpiant.getMeetingTypesOptions().clickJoinMeetingButton();
}
private void passwordProtectedPage(String meetingPassword, WebParticipant P)
{
// TestUtils.waitForDisplayedElementByXPath(driver, "//p[text()='This
meeting is
// password protected.']", 30);
WebElement joinElm = P.getMeetingTypesOptions().joinMeetingButtonWait;
if (P.waitForElement("//input[@data-testid='password']", 15)) {
P.getDriver().findElement(By.xpath("//input[@data-
testid='password']")).sendKeys(meetingPassword);
P.waitFor(joinElm, 5, TimeUnit.SECONDS, WAIT_FOR.CLICKABLE, null,
true);
((JavascriptExecutor)
P.getDriver()).executeScript("arguments[0].click()",joinElm);
}

// checkPassword(meetingPassword,conferenceUrl);

}
private void joinGuestParticpiant(WebParticipant participant) {
WebElement joinElm = participant.getMeetingTypesOptions().guestButton;
WebElement userName = participant.getMeetingTypesOptions().userName;
WebElement submitButton =
participant.getMeetingTypesOptions().submitButton;
participant.waitFor(joinElm, 10, TimeUnit.SECONDS, WAIT_FOR.CLICKABLE,
null, true);
joinElm.click();
participant.waitFor(userName, 5, TimeUnit.SECONDS, WAIT_FOR.VISIBLE,
null, true);
userName
.sendKeys(participant.getName());
participant.waitFor(submitButton, 10, TimeUnit.SECONDS,
WAIT_FOR.CLICKABLE, null, true);
submitButton.click();
participant.waitForInvisbilityElement("//input[@data-
testid='username']", 3);
}
private void startMeetingSaveAndLaunch(JitsiMeetUrl conferenceUrl) {
participant1.getMeetingTypesOptions().checkSaveAndCopyMeetingLink();

participant1.getMeetingTypesOptions().ClickSaveAndCopyMeetingLinkClicable();

participant1.getMeetingTypesOptions().clickMeetingUrlLink(conferenceUrl.getRoomName
());
}

private String launchPreJoinPageForOwner(WebParticipantOptions


targetOptions1) {
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 1);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant1 = participants.createParticipant(configPrefix,
targetOptions1);

participant1.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");
if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant1.getDriver().get(URL);

String password =
ConfigurationManager.instance().getProperties().get("password");

retValue = retValue && loginMeeting(participant1, URL, password, true,


true);
List<WebElement> elemList =
participant1.getStartedOptions().getLastMeetingsList();
if (elemList.size() > 0) {
checkLastMeeting = elemList.get(0).getText();
}
return checkLastMeeting;
}

private String launchPreJoinPageForModerator(WebParticipantOptions


targetOptions2) {
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 2);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant2 = participants.createParticipant(configPrefix,
targetOptions2);

participant2.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant2.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeeting(participant2, URL, password, true,
true);
List<WebElement> elemList =
participant2.getStartedOptions().getLastMeetingsList();
if (elemList.size() > 0) {
checkLastMeeting = elemList.get(0).getText();
}
return checkLastMeeting;
}

private String launchPreJoinPageForGuest(WebParticipantOptions


targetOptions3) {
String configPrefix = getUsernamePrefix() + (0 + getStartIndex() + 3);
String meetingPassword =
ConfigurationManager.instance().getProperties().get("meetingPassword");
Boolean retValue = true;
String checkLastMeeting = "";
this.participant3 = participants.createParticipant(configPrefix,
targetOptions3);

participant3.executeScript("console.log('--- Will start test:" +


getClass().getSimpleName() + "')");
JitsiMeetUrl meetURL = getJitsiMeetUrl();
meetURL = Objects.requireNonNull(meetURL, "meetURL");

if (meetURL == null) {
meetURL = getJitsiMeetUrl();
}
String URL = meetURL.getServerUrl();
if (URL.contains("/meeting"))
URL = URL.substring(0, URL.indexOf("/meeting"));
meetURL = Objects.requireNonNull(meetURL, "meetURL");

meetURL.appendConfig(getDefaultConfig(), false);

// TestUtils.print(getName() + " is opening URL: " + meetURL);


participant3.getDriver().get(URL);
String password =
ConfigurationManager.instance().getProperties().get("password");
retValue = retValue && loginMeetingForGuest(participant3, URL, true,
true);
List<WebElement> elemList =
participant3.getStartedOptions().getLastMeetingsList();
if (elemList.size() > 0) {
checkLastMeeting = elemList.get(0).getText();
}
return checkLastMeeting;
}

private boolean loginMeetingForGuest(WebParticipant Partipiant, String URL,


boolean isSuccess, boolean retry) {
TestUtils.print("Login URL: " + URL);
try {
TestUtils.waitForElementByXPath(Partipiant.getDriver(),
"//button[@data-testid='joinGuestBtn']", 60);
Partipiant.getDriver().findElement(By.xpath("//button[@data-
testid='joinGuestBtn']")).click();
WebElement userElem =
Partipiant.getDriver().findElement(By.xpath("//input[@data-testid='username']"));
while (!userElem.getAttribute("value").equals("")) {
userElem.sendKeys(Keys.BACK_SPACE);
}
;
TestUtils.waitMillis(500);
Partipiant.getDriver().findElement(By.xpath("//input[@data-
testid='username']"))
.sendKeys(Partipiant.getName());
Partipiant.getDriver().findElement(By.xpath("//button[@data-
testid='submitButton']")).click();
Boolean elem = Partipiant.waitForElement(
"//div[@data-testid='welcomeUser']", 10);
if (elem) {
return (!isSuccess ? true : false);
} else {
return (!isSuccess ? false : true);
}
} catch (NoSuchElementException | TimeoutException x) { return (!
isSuccess ? true : false);
}
}
private boolean validateVideoDownload(String meetingName) {
TestUtils.waitMillis(3000);
try {
String home =
ConfigurationManager.instance().getIsRemote().equalsIgnoreCase("Y")
? Paths.get(new
File("").getAbsoluteFile().getAbsolutePath()).getParent().toAbsolutePath()
.toString()
: System.getProperty("user.home") + "/Downloads/";

System.out.println(ConfigurationManager.instance().getIsRemote().equalsIgnoreCase("
Y"));
File file =
ConfigurationManager.instance().getIsRemote().equalsIgnoreCase("Y")
? new File(home, "fakestream")
: new File(home);

File filesList[] = file.listFiles();


for (File files : filesList) {
if(files.getName()!=null) {
if (files.getName().contains(meetingName)) {
String extension =
FilenameUtils.getExtension(files.getAbsolutePath());
if (extension.equalsIgnoreCase("mp4")) {
files.delete();
return true;
}
}
}
}
return false;
} catch (Exception x) {
return false;
}
}

private boolean checkStartButtonIsEnabled() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getMeetingTypesOptions().checkbtnStartEnabledLabel();
if (val)
return true;
System.out.println(i);
TestUtils.waitMillis(500);
} while (i <= 5);
return false;
}

private boolean checkManageMembersBtnInPreJoinIsEnabled() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getMeetingTypesOptions().checkManageMembersEnabled();
if (val)
return true;
System.out.println(i);
TestUtils.waitMillis(500);
} while (i <= 5);
return false;
}

private boolean checkManageMembersBtnInSettingsIsEnabled() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getSettingsActions().checkManageMembersBtnEnabled();
if (val)
return true;
System.out.println(i);
TestUtils.waitMillis(500);
} while (i <= 5);
return false;
}

private boolean checkJoinMeetingBtnIsEnabled() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getMeetingTypesOptions().checkJoinMeetingBtnEnabled();
if (val)
return true;
System.out.println(i);
TestUtils.waitMillis(500);
} while (i <= 5);
return false;
}

private void waitforMeetingLoad(WebDriver driver) {


try {
WebDriverWait wait = new WebDriverWait(participant1.getDriver(), 180);

wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt(By.id("jitsiConferenc
eFrame0")));
}
catch(Exception x) {
MeetUtils.waitForPageToLoad(participant1.getDriver());

}
}

private boolean checkApplyButtonIsEnabled() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getMeetingTypesOptions().checkApplyButtonEnabled();
if (val)
return true;
System.out.println(i);
TestUtils.waitMillis(500);
} while (i <= 3);
return false;
}

private void meetingStart() {


int i = 0;
do {
i += 1;
Boolean val =
participant1.getMeetingTypesOptions().checkJoinMeetingButton();
if (val)
break;
} while (i <= 3);

participant1.getMeetingTypesOptions().clickJoinMeetingButton();
}
}

You might also like