We know that the entire world is suffering COVID 19 pandemic. Recently, We are hearing the words lockdown, stay home, stay safe, break the chain, work from home. Friends, we know that everyone is working from home in different countries and some are completely isolated. The only way to interact via phone calls, video conferences medium with the help of a bunch of applications. In my case also, I am using the Zoom application for official meetings, virtual birthday celebrations, virtual happy hours activities.
We know that Zoom is incredibly popular. As I mentioned everyone is using it for their video meetings these days. In this article, I would like to share a start Zoom meeting session to break the chain and enjoy your meetings with the help of Appium. If you already installed Zoom application in Android phone then you just pass package name and activity name via desired capabilities. Otherwise you need to download the Zoom APK and pass the abseolute path of the APK using app capabiltiy. Following desired capabilities will help you to start session with Zoom:
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, “One Plus”); //use your device name
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, “Android”);
capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, “10”);
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.ANDROID_UIAUTOMATOR2);
capabilities.setCapability(AndroidMobileCapabilityType.APP_PACKAGE, “us.zoom.videomeetings”);
capabilities.setCapability(AndroidMobileCapabilityType.APP_ACTIVITY, “com.zipow.videobox.LauncherActivity”);
capabilities.setCapability(“udid”, “e6916f40”); //use your device UDID
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
driver = new AndroidDriver(new URL(“http://0.0.0.0:4723/wd/hub”), capabilities);
Joining a Zoom Meeting
The goal is to do something useful with automation, so let’s see how it’s possible to join a Zoom meeting from a device controlled by Appium. Before we begin, we’ll obviously need a Zoom meeting ID. You can assign the Zoom meeting ID to a vaiable let’s say,
private static final String MEETING_ID = “8731672377”; //use your meeting ID to join
Sometimes, you may need to pass the Zoom meeting password once after you entered the meeting ID. In that case you can assign the Zoom meeting password to a variable and pass that variable in the script. Next step is to identiy the relvant elements from the Zoom application, you can use Appium Desktop to inspect the elements and assigne to variables as below,
By JOIN_MEETING_BUTTON = By.id(“us.zoom.videomeetings:id/btnJoin”);
By MEETING_ID_FIELD = By.id(“us.zoom.videomeetings:id/edtConfNumber”);
By ACTUALLY_JOIN_MEETING_BUTTON = By.id(“us.zoom.videomeetings:id/btnJoin”);
By LEAVE_BTN = By.id(“us.zoom.videomeetings:id/btnLeave”);
Once you identified the elements, you can start your Zoom meeting as follows,
@Test
public void testStartYourZoomMeeting() {
driver.findElement(JOIN_MEETING_BUTTON).click();
driver.findElement(MEETING_ID_FIELD).sendKeys(MEETING_ID);
driver.findElement(ACTUALLY_JOIN_MEETING_BUTTON).click();
Assert.assertTrue(“Failed to Join Zoom Session”, driver.findElement(LEAVE_BTN).isDisplayed());
}
Dear friends, try to use above logic to start a new Zoom session, join your virtual meetings and break the chain. Stay safe at home.
make it perfect!
Leave a Reply