Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.27 KB | None | 0 0
  1. @BeforeTest
  2. public void setUp() throws FileNotFoundException, IOException, IllegalMonitorStateException
  3. {
  4.  
  5.  
  6. //File app = new File("/Users/first.last/Library/Developer/Xcode/DerivedData/iPhone-aowtfpozolcnpigbxzxxxxkyiubq/Build/Products/Debug-iphonesimulator/TheWeather.app");
  7.  
  8.  
  9. DesiredCapabilities capabilities = new DesiredCapabilities();
  10.  
  11. capabilities.setCapability(MobileCapabilityType.BROWSER_NAME, "iOS");
  12.  
  13. //8.4
  14. capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, "8.4");
  15. //Iphone 6-(storytelling)-igor
  16.  
  17. capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "Iphone 6-(storytelling)-name");
  18.  
  19. //capabilities.setCapability(MobileCapabilityType.APP, app.getAbsolutePath());
  20. capabilities.setCapability("bundleID", "com.weather.TWC");
  21. //70cb6f4fd5e313b16742c083ccbc1897d82b094d
  22. capabilities.setCapability("udid", "70cb6f4fd5e313b16742c083ccbc1897d82b094d");
  23.  
  24. driver = new IOSDriver(new URL("http://127.0.0.1:4723/wd/hub"),capabilities);
  25. driver = (IOSDriver) new Augmenter().augment(driver);
  26. System.out.println(capabilities.getCapability(MobileCapabilityType.DEVICE_NAME));
  27. logger.info("Environment: iOS 8.4 and iPhone 6 plus device");
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement