NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

package TestPoc;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

import junit.framework.Assert;

public class MultithreadPOC extends Thread implements Runnable {
public static final String driverPath_chrome1 = "/Users/v4/Documents/Selenium POI Jars_Drivers/chromedriver";
WebDriver driver;
String url = "https://10.20.239.142:8081/s2b/global/corporate/v1.0/implementation/app/login.html";
String userName ;
public MultithreadPOC(String userName) {
// TODO Auto-generated constructor stub
this.userName = userName;
//super(thrdName);

}

@Override
public void run(){

System.out.println("Thread started"+MultithreadPOC.currentThread().getName());

System.out.println(MultithreadPOC.currentThread().getName()+"user Name"+userName);

try{
Thread.sleep(3000);

browserInit();

applicationLaunch(userName);

//driver.quit();
}
catch(Exception e){
System.out.println(e.getMessage());
}
System.out.println("Thread Ends Here"+MultithreadPOC.currentThread().getName());
}
//input[@placeholder='User ID'])[1]
private void applicationLaunch(String userName) {
// TODO Auto-generated method stub
driver.get(url);

String pageTitle = driver.getTitle();

System.out.println(pageTitle);
driver.findElement(By.xpath("//input[@placeholder='User ID'][1]")).sendKeys(userName);
driver.findElement(By.xpath("//p[@class='button-text'][1]")).click();
}

private void browserInit() {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", driverPath_chrome1);
driver = new ChromeDriver();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);


}

public static void main(String[] args) {
//
// //Thread t1 = new MultithreadPOC("Thread1");
// //Thread t2 = new MultithreadPOC("Thread2");
// System.out.println("Starting threads");
// t1.start();
// t2.start();
// System.out.println("Threads have been started");
Runnable t1 =new MultithreadPOC("[email protected]");
Runnable t2 =new MultithreadPOC("[email protected]");
Runnable t3 =new MultithreadPOC("[email protected]");
Runnable t4 =new MultithreadPOC("[email protected]");
//Runnable t5 =new MultithreadPOC("[email protected]");

new Thread(t1).start();
new Thread(t2).start();
new Thread(t3).start();
new Thread(t4).start();
}

}
     
 
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.