コード例 #1
0
  /**
   * Closes the participant and leaves the owner alone in the room. Mutes the owner and then joins
   * new participant and checks the status of the mute icon. At the end unmutes to clear the state.
   */
  public void muteOwnerBeforeSecondParticipantJoins() {
    ConferenceFixture.quit(ConferenceFixture.getSecondParticipant());

    // just in case wait
    TestUtils.waits(1000);

    MeetUIUtils.clickOnToolbarButton(ConferenceFixture.getOwner(), "mute");

    ConferenceFixture.startParticipant();

    ConferenceFixture.checkParticipantToJoinRoom(ConferenceFixture.getSecondParticipant(), 10);

    ConferenceFixture.waitsParticipantToJoinConference(ConferenceFixture.getSecondParticipant());

    TestUtils.waitsForElementByXPath(
        ConferenceFixture.getSecondParticipant(),
        "//span[@class='audioMuted']/i[@class='icon-mic-disabled']",
        5);

    // now lets unmute
    unMuteOwnerAndCheck();
  }
コード例 #2
0
  /**
   * Finds the menu that can be used by the owner to control the participant. Hovers over it. Finds
   * the mute link and mute it. Then checks in the second participant page whether it is muted
   */
  public void ownerMutesParticipantAndCheck() {
    WebElement elem =
        ConferenceFixture.getOwner()
            .findElement(By.xpath("//span[@class='remotevideomenu']/i[@class='fa fa-angle-down']"));

    Actions action = new Actions(ConferenceFixture.getOwner());
    action.moveToElement(elem);
    action.perform();

    TestUtils.waitsForDisplayedElementByXPath(
        ConferenceFixture.getOwner(), "//ul[@class='popupmenu']/li/a[@class='mutelink']", 5);

    ConferenceFixture.getOwner()
        .findElement(By.xpath("//ul[@class='popupmenu']/li/a[@class='mutelink']"))
        .click();

    // and now check whether second participant is muted
    TestUtils.waitsForElementByXPath(
        ConferenceFixture.getSecondParticipant(),
        "//span[@class='audioMuted']/i[@class='icon-mic-disabled']",
        5);

    action.release();
  }