Posts

Showing posts from April, 2017

JavaMail API – Sending email via Gmail SMTP

Image
                      How to send a mail through SMTP server using java programming, it's bulk process to send test cases(Screenshots, description. text ) to many emails by manually so using JavaMail API it can be possible to send many users at a time. This article will show you how to send a mail through SMTP server using java programming and follow below steps. 1. Create Maven Project 2. For sending the email using JavaMail API, you need to load the two jar files: mail.jar activation.jar Download these zip file 3. Project structure MonitoringMail.java package com.nbos.utility; import java.util.Properties; import javax.mail.Authenticator; import javax.mail.BodyPart; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeBod

Appium - Getting android app Package name and appActivity

Image
While launching an application using Appium, it is required to have the appPackage and appActivity to set the Desired Capabilities. Earlier it used to be a long and tedious task to get these details from the apk file but now there are multiple easy ways to find this information. Example: capabilities.setCapability("appPackage", "com.whatsapp"); capabilities.setCapability("appActivity", "com.whatsapp.Main"); 1. Using APK info android app 2. Using command prompt 3. Using logcat In Command Prompt 4. Using AndroidManifest.xml Appium itself The best and the easiest way to find the appPackage and appActvity is from the Appium itself. Before that you need to start your Appium client. 1) Start the Appium client. The Below mentioned window will display, Once you started the Appium client. 2) Click on the android icon marked above to open the configuration settings. 3) Check the Application Path check box.