Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.junit.Test
- import org.openqa.selenium.phantomjs.PhantomJSDriver
- import org.openqa.selenium.remote.DesiredCapabilities
- import org.openqa.selenium.{Dimension, By, OutputType}
- /**
- * Created by gcc on 20.10.2014.
- */
- class DummyTest {
- @Test
- def dummyTest() : Unit = {
- val cap = new DesiredCapabilities()
- cap.setCapability("screen-resolution","1280x1024");
- cap.setCapability("phantomjs.binary.path", "W:\\phantomjs-1.9.7-windows\\phantomjs.exe")
- val driver = new PhantomJSDriver(cap)
- driver.get("http://onlinelibrary.wiley.com/enhanced/doi/10.1111/acel.12215/")
- driver.manage().window().setSize(new Dimension(1920, 1280))
- val scrFile = driver.getScreenshotAs(OutputType.FILE)
- driver.findElement(By.linkText("Log in / Register")).click()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement