public static  ArrayList<String> FetchjobsFromJobPortal(String urlForJob)
	{
	    WebDriver driver1 =  new FirefoxDriver();
	    // Code for pagination
	    driver1.get(urlForJob);
	    ArrayList<String> listOfJobs      =  new ArrayList<String>();
		
		
		//WebElement         ulOfPagination =  divForJobs.findElement(By.xpath("//ul[contains(@class,'jPag-pages')]"));
		//List<WebElement>       listOfHref =  ulOfPagination.findElements(By.tagName("li"));
	    WebElement             divForJobs =  driver1.findElement(By.xpath("//div[contains(@class,'pagination')]"));
		List<WebElement>       listOfHref =  divForJobs.findElements(By.tagName("a"));
		
		for(int i = 0 ; i < listOfHref.size() ;i++)
		{
			
			    //System.out.println(listOfHref.get(i).getAttribute("href"));
			    if(listOfHref.get(i).getAttribute("class").equals("next"))
			    {
				    try
					{
					     //listOfHref.get(i).click();
				    	 //WebElement    divForJobs1           =  driver1.findElement(By.xpath("//*[@id=\"search_content\"]/div[4]"));
						 //List<WebElement>        listOfDiv1  =  divForJobs1.findElements(By.xpath("//div[contains(@class,'search_listing search_listing_blue')]"));
						 List<WebElement>        listOfDiv1   =  driver1.findElements(By.xpath("//li[contains(@class,'result')]"));
						 
						 int j = 0;
						 for(; j < listOfDiv1.size() ; j++)
							{ 
								    //System.out.println("---------------------------------------------------------------");
							        // System.out.println(listOfDiv1.get(j).getText());
								    listOfJobs.add(listOfDiv1.get(j).getText());
								    //Write In a file
								    //FileWriteUsingAppendMode("/home/amit/Desktop/jobs.txt",listOfDiv1.get(j).getText());
				   		    }
						 System.out.println(j +"jobs are got from this link :"+listOfHref.get(i).getAttribute("href"));
					    
						 driver1.get(listOfHref.get(i).getAttribute("href"));
						 
						 driver1.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
					     try 
						    {
									Thread.sleep(1000);
						    }// try close 
					     catch (InterruptedException e) 
							{
									e.printStackTrace();
							}// catch close
					     
					    
					 		 
					} // try close
					
					catch(NoSuchElementException e)
					{
						 System.out.println("No Such Element Error");
					}// catch close
					catch(NotFoundException e)
					{
						 System.out.println("Not Found Exception");
					}// catch close
					catch(StaleElementReferenceException e)
					{
						System.out.println("Not Found in the cache");
					}// catch close
				    
				    
			    i=0;
			    }// if close
			      // reload the list of pagination
	              divForJobs =  driver1.findElement(By.xpath("//div[contains(@class,'pagination')]"));
			      listOfHref =  divForJobs.findElements(By.tagName("a"));
		}// for close
	driver1.close();
	// return list of all jobs
 return listOfJobs;		
}