as

Sunday, 14 June 2015

Must See places in and around Brisbane

Tourist Places in and around Brisbane

Below map shows the map of main tourist places.


Here is the list of top places to visit in and around Brisbane.

Tourist places in Brisbane City
  1. South Bank Parkland
  2. Story Bridge
  3. Central Museum
  4. Art Gallery
  5. Gabba Cricket Stadium
  6. Mount coot-tha
  7. Lone Pine - Koala Sanctuary
Below map shows major tourist destinations within city.





Tourist places in southern side of Brisbane City
  1. Stradbroke Island
  2. GoldCoast - surfers paradise, sky point observation deck, burleigh heads, currumbin, dreamworld theme park, Sea world, Springbrook national park

Tourist places in Northern side of Brisbane City
  1. Moreton Island
  2. Sunshine Coast
Here is the list of some more places
  1. Whitsunday islands
  2. Mackay Highlands Great Walk
  3. Cape York, Tropical North Queensland
  4. Daintree Rainforest, Tropical North Queensland
  5. Whale watching @ Hervey Bay, Fraser Coast
  6. Birdsville, Outback Queensland
  7. Islands of the Southern Great Barrier Reef

You can refer zone map of Brisbane city and translink site to know how to travel to these places.
What do you think on this topic? Please express your opinion or ask any question through comment below. You can write to me at reply2sagar@gmail.com

Monday, 1 June 2015

How to get search queries for given keyword from Google by Automation

Here is the sample program to get the list of search queries related to given keyword.
package framework;

import java.io.File;
import java.io.FileWriter;
import java.io.PrintStream;
import java.util.List;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.remote.DesiredCapabilities;

public  class Google {
   
   
   public static void main(String[] args) {
   
         WebDriver driver =null;
         
   System.setProperty("webdriver.chrome.driver", "F:\\selenium\\chromedriver.exe");
   System.out.println(System.getProperty("webdriver.chrome.driver"));
   driver = new ChromeDriver();
   
  // driver = new ChromeDriver(DesiredCapabilities.chrome());      driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
   driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
   driver.manage().window().maximize();
   
   try{
      
driver.get("https://www.google.co.in/preferences?hl=en-IN&fg=1");  
driver.findElement(By.xpath("//div[text()='Never show Instant results.']")).click();
driver.findElement(By.xpath("//div[text()='Save']")).click();

driver.get("https://www.google.co.in");       

//String x = driver.switchTo().frame(0).switchTo().frame(0).findElement(By.tagName("h3")).getText();//String x = driver.switchTo().frame(1).findElement(By.tagName("h3")).getText();//String x = driver.switchTo().frame("view").switchTo().frame(0).getPageSource();//System.out.println(x);
String str = "windows 7 How to ";
String d = "";
   
for (int i=1 ;i<=26;i++)
   
{
   char x = (char) (64+i);
   
driver.findElement(By.cssSelector("input[name=q]")).sendKeys(str + x);

Thread.sleep(2000);
List <WebElement> tr =  driver.findElements(By.xpath("//table[@class='gssb_m']//tr"));

for (int co=0 ; co<tr.size();co=co+2)
{
   
   d= d + tr.get(co).getText() + "\r\n";
}

driver.findElement(By.id("lst-ib")).clear();

}

System.out.println(d);
String filePath = "f:\\videos\\"+ str +".txt";
               
               if ((new File(filePath)).exists() )
                  (new File(filePath)).delete();
               
               
               File temp = new File(filePath);
               FileWriter fw = new FileWriter(temp,true);
               fw.append(d);
               fw.close();
               


 

            Thread.sleep(4000);
            //driver.navigate();//driver.navigate("http://www.google.com");      }catch(Exception e){

   //System.out.println(e.getLocalizedMessage());                  e.printStackTrace(new PrintStream(System.out));
         
      }
         
         
      finally{
         driver.close();
         driver.quit();
      }  
         
      
      
      
      
   }
   
   

   
}


What do you think on this topic? Please express your opinion or ask any question through comment below. You can write to me at reply2sagar@gmail.com

Sponsored Links

Popular Posts

Comments

ShareThis