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
driver.findElement(By.cssSelector("body")).sendKeys(Keys.COMMAND + "t"); |
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
driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL + "t"); |
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
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.chrome.ChromeDriver; | |
import org.openqa.selenium.chrome.ChromeOptions; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
/** | |
* Created by Amol Chavan on 9/10/2016. | |
*/ | |
public class DriverFactory { |
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
public void highlightElement(WebElement element) { | |
for (int i = 0; i < 5; i++) { | |
WrapsDriver wrappedElement = (WrapsDriver) element; | |
JavascriptExecutor driver = (JavascriptExecutor) | |
wrappedElement.getWrappedDriver(); | |
driver.executeScript("arguments[0].setAttribute('style',arguments[1]);", | |
element, "color: green; border: 5px solid green;"); | |
driver.executeScript("arguments[0].setAttribute('style',arguments[1]);",element, ""); | |
} |
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
import com.utilities.ObjectMap; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
/** | |
* Created by Amol Chavan on 11-07-2016. | |
*/ | |
public class TestRunner { | |
public static void main(String[] args){ | |
ObjectMap objectMap = new ObjectMap("Login.properties"); | |
FirefoxDriver driver = new FirefoxDriver(); |
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
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebElement; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
import java.util.Properties; | |
public class ObjectMap extends ActionUtilities{ | |
Properties properties; |
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
public class DriverFactory { | |
public static WebDriver createInstance(){ | |
DesiredCapabilities capabilities = DesiredCapabilities.chrome(); | |
ChromeOptions options = new ChromeOptions(); | |
options.addArguments("disable-notifications"); | |
capabilities.setCapability(ChromeOptions.CAPABILITY, options); | |
WebDriver driver = new ChromeDriver(); |
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
public void doDoubleClick(){ | |
WebElement body = driver.findElement(By.tagName("body")); | |
Actions actions= new Actions(driver).doubleClick(body); | |
actions.build().perform(); | |
} | |
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
wd |
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
import com.mongodb.*; | |
import com.mongodb.client.MongoCollection; | |
import com.mongodb.client.MongoDatabase; | |
import org.bson.Document; | |
import tests.TestBaseSetup; | |
import java.util.Arrays; | |
import java.util.Properties; | |
/** | |
* Created by Amol Chavan on 03-06-2016. | |
*/ |