--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/fc06c0ee-2cd3-4d44-a16e-70d21655a53b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f6e084c6-c7cd-44bd-b78d-c0a1fe104c60%40googlegroups.com.
Tried all methods that are commented...and later tried with applescript which worked but i would like to know if there is anyother way to use Robot class in MAC
public static void main(String[] args) throws Throwable {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "/Users/rashmimohan/Desktop/Selenium_IDE/chromedriver");
WebDriver driver = new ChromeDriver();
//System.setProperty("webdriver.gecko.driver", "/Users/rashmimohan/Desktop/Selenium_IDE/geckodriver");
//WebDriver driver = new FirefoxDriver();
driver.get("https://www.phptravels.net/");
/*for(int row = 2; row<=2;row++)
{
for(int col = 1;col<=1;)
{
search_by_cityname(driver,excel_read(row,col));
//col++;
//click_cityname(driver,excel_read(row,col));
}
} */
WebElement city_text = driver.findElement(By.xpath("//*[@id=\"s2id_autogen8\"]/a/span[1]"));
city_text.click();
WebElement entername = driver.findElement(By.xpath("//*[@id=\"select2-drop\"]/div/input"));
entername.sendKeys("Bangalore");
//entername.sendKeys(Keys.ENTER);
Thread.sleep(1000);
Runtime.getRuntime().exec("osascript "+"/Users/rashmimohan/Desktop/Testingkeyboardevents.scpt");
//Keys.chord(Keys.ENTER);
//Keys.chord(Keys.COMMAND,"ENTER");
//KeyEvent.KEY_PRESSED(Keys.ENTER);
//Thread.sleep(1000);
/*Robot r = new Robot();
r.delay(1000);
r.keyPress(KeyEvent.VK_ENTER);
r.keyRelease(KeyEvent.VK_ENTER);
/* String os = System.getProperty("os.name");
if (os.equals("WINDOWS")){
Keys.chord(Keys.CONTROL, "a");
}else{
Keys.chord(Keys.COMMAND.ENTER);
}*/
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/41a8c863-0b16-4146-b8a1-5abe0c4b8b72%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/eceb7ef1-482a-46fe-a89b-a2d87a3cfbfc%40googlegroups.com.