NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

String[] platform=platformToBeExecuted.split("_",0);
// while(constants.driver==null || constants.driver.getCapabilities().getBrowserName()!=null)
// {
// platform[1]=constants.driver.getCapabilities().getBrowserName();
// //temp=1;


switch(platform[1].toLowerCase())
{


case "gchrome":



System.out.println("Platform to be executed: Chrome");

System.setProperty("webdriver.chrome.driver",constants.pathToChromeDriver);

/****
To remove message "You are using an unsupported command-line flag: --ignore-certificate-errors.
Stability and security will suffer."
Add an argument 'test-type'
******/

ChromeOptions options = new ChromeOptions();
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("credentials_enable_service", false);
prefs.put("password_manager_enabled", false);
options.setExperimentalOption("prefs", prefs);

DesiredCapabilities cap=new DesiredCapabilities();
cap.setCapability(ChromeOptions.CAPABILITY, options);
if(constants.driver==null)
{
constants.driver = new ChromeDriver(cap);
constants.driver.get(constants.urlOfApplication);
}
else if(constants.driver!=null && constants.driver.getCapabilities().getBrowserName().equals("chrome"))
{

constants.driver.get(constants.urlOfApplication);

}


constants.driver.manage().window().maximize();

//Assigning category. Each platform is marked as one category.
constants.extentTest.assignCategory("Chrome");


break;
case "firefox":

System.setProperty("webdriver.gecko.driver", constants.pathToFFDriver);
constants.driver = new FirefoxDriver();

constants.driver.get(constants.urlOfApplication);
constants.driver.manage().window().maximize();

constants.extentTest.assignCategory("FireFox");
break;

case "ie":

System.setProperty("webdriver.ie.driver", constants.pathToIEDriver);
constants.driver = new InternetExplorerDriver();
constants.driver.get(constants.urlOfApplication);
System.out.println("2");
break;
case "safari":


if(constants.driver==null)
{
System.out.println("if inside safari");

// constants.driver = new SafariDriver();
// constants.driver.get(constants.urlOfApplication);
}
else if(constants.driver!=null && constants.driver.equals("safari"))
{
System.out.println("else if inside safari");
// constants.driver.get(constants.urlOfApplication);

}
// constants.driver = new SafariDriver();
// constants.driver.get(constants.urlOfApplication);
// constants.driver.manage().window().maximize();

constants.extentTest.assignCategory("Safari");
break;


case "ios":

System.out.println("Platform to be executed: iOS");

constants.extentTest.assignCategory("iOS");

//Running testng programtically
testng = new TestNG();
suites = Lists.newArrayList();
//Invoking respective module xml
suites.add(".//iostestng.xml");
testng.setTestSuites(suites);
testng.run();
break;

case "android":

System.out.println("Platform to be executed: Android");
System.out.println("App is intalled with " + constants.androidPackageName);
constants.extentTest.assignCategory("Android");

//Running testng programtically
testng = new TestNG();
suites = Lists.newArrayList();
//Invoking respective module xml
suites.add(".//androidtestng.xml");
testng.setTestSuites(suites);
testng.run();
break;

default :
System.out.println("Unsupported Platform");
throw new NotSupportedException("UnSupported Platform is ", platform[1]);

}


System.out.println("Platform executed is "+ platform[1]);
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.