forked from avestech/ggcmaps.github.io
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
Testing/Testing in BrowserStack/Test_FloorChangeDropdown.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.Platform; | ||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.remote.DesiredCapabilities; | ||
import org.openqa.selenium.remote.RemoteWebDriver; | ||
import org.openqa.selenium.support.FindBy; | ||
import org.openqa.selenium.support.How; | ||
|
||
import java.net.URL; | ||
|
||
//BrowserStack Testing using Windows10 and Chrome57 | ||
//this test locates the Search bar, search "B 1200", find drop down, **switch to second floor pending | ||
public class Test_FloorChangeDropdown { | ||
public static final String USERNAME = "margaretmuse1"; | ||
public static final String AUTOMATE_KEY = "TkXzjX1qfdisxpdSMPb1"; | ||
public static final String URL = "https://" + USERNAME + ":" + AUTOMATE_KEY + "@hub-cloud.browserstack.com/wd/hub"; | ||
|
||
public static void main(String[] args) throws Exception { | ||
|
||
DesiredCapabilities caps = new DesiredCapabilities(); | ||
//set capabilities for desired browser | ||
caps.setCapability("browser", "Chrome"); | ||
caps.setCapability("browser_version", "57.0"); | ||
caps.setCapability("os", "Windows"); | ||
caps.setCapability("os_version", "10"); | ||
caps.setCapability("resolution", "1024x768"); | ||
|
||
//set debugging element to true to enable console logging | ||
caps.setCapability("browserstack.debug", "true"); | ||
|
||
//create new webdriver | ||
WebDriver driver = new RemoteWebDriver(new URL(URL), caps); | ||
driver.get("https://soft-eng-practicum.github.io/ggcmaps/#Campus"); | ||
//search for b 1200 | ||
WebElement searchbar = driver.findElement(By.id("roomSearch")); | ||
searchbar.sendKeys("B 1200"); | ||
//select search | ||
|
||
WebElement searchgo = driver.findElement(By.id("search")); | ||
searchgo.click(); | ||
|
||
WebElement floordropdown = driver.findElement(By.id("floor")); | ||
floordropdown.click(); | ||
|
||
// WebElement searchgo = driver.findElement(By.id("search")); | ||
// searchgo.click(); | ||
|
||
|
||
System.out.println(driver.getTitle()); | ||
driver.quit(); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters