How to use RemoteWebDriver class of org.openqa.selenium.remote package

Best Selenium code snippet using org.openqa.selenium.remote.RemoteWebDriver

Source:pureDrivers.java Github

copy

Full Screen

...226 227 228 // ************************************************************************************************************************ get229 // WebDriver [0] = public abstract void org.openqa.selenium.WebDriver.get(java.lang.String)230 // ChromeDriver [9] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)231 // FireFoxDriver [3] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)232 // InternetExplorerDriver [2] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)233 // EdgeDriver [0] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)234 // OperaDriver [5] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)235 // SafariDriver [1] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)236 // AndroidDriver [44] = public void org.openqa.selenium.remote.RemoteWebDriver.get(java.lang.String)237 public static void get( String URL ) {238 pureDriverDetails currentDriver = getCurrentDriverDetails();239 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "get", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), URL );240 }241 242 // ************************************************************************************************************************ close243 // WebDriver [1] = public abstract void org.openqa.selenium.WebDriver.close()244 // ChromeDriver [11] = public void org.openqa.selenium.remote.RemoteWebDriver.close()245 // FireFoxDriver [5] = public void org.openqa.selenium.remote.RemoteWebDriver.close()246 // InternetExplorerDriver [4] = public void org.openqa.selenium.remote.RemoteWebDriver.close()247 // EdgeDriver [2] = public void org.openqa.selenium.remote.RemoteWebDriver.close()248 // OperaDriver [7] = public void org.openqa.selenium.remote.RemoteWebDriver.close()249 // SafariDriver [3] = public void org.openqa.selenium.remote.RemoteWebDriver.close()250 // AndroidDriver [45] = public void org.openqa.selenium.remote.RemoteWebDriver.close()251 public static void close() {252 pureDriverDetails currentDriver = getCurrentDriverDetails();253 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "close", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );254 }255 // ************************************************************************************************************************ quit256 // WebDriver [2] = public abstract void org.openqa.selenium.WebDriver.quit()257 // ChromeDriver [13] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()258 // FireFoxDriver [6] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()259 // InternetExplorerDriver [5] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()260 // EdgeDriver [3] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()261 // OperaDriver [8] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()262 // SafariDriver [4] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()263 // AndroidDriver [46] = public void org.openqa.selenium.remote.RemoteWebDriver.quit()264 // quit not wrapped as it call the driverSetup->quit method265 public static void quit() {266 pureDriverQuit();267 }268 269 // ************************************************************************************************************************ getCurrentUrl270 // WebDriver [3] = public abstract java.lang.String org.openqa.selenium.WebDriver.getCurrentUrl()271 // ChromeDriver [14] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()272 // FireFoxDriver [7] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()273 // InternetExplorerDriver [6] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()274 // EdgeDriver [4] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()275 // OperaDriver [9] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()276 // SafariDriver [5] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()277 // AndroidDriver [49] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getCurrentUrl()278 public static String getCurrentUrl() {279 pureDriverDetails currentDriver = getCurrentDriverDetails();280 return (String)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getCurrentUrl", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );281 }282 // ************************************************************************************************************************ getTitle283 // WebDriver [4] = public abstract java.lang.String org.openqa.selenium.WebDriver.getTitle()284 // ChromeDriver [15] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()285 // FireFoxDriver [8] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()286 // InternetExplorerDriver [7] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()287 // EdgeDriver [5] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()288 // OperaDriver [10] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()289 // SafariDriver [6] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()290 // AndroidDriver [50] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getTitle()291 public static String getTitle() {292 pureDriverDetails currentDriver = getCurrentDriverDetails();293 return (String)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getTitle", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );294 }295 296 // ************************************************************************************************************************ getPageSource297 // WebDriver [5] = public abstract java.lang.String org.openqa.selenium.WebDriver.getPageSource()298 // ChromeDriver [18] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()299 // FireFoxDriver [9] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()300 // InternetExplorerDriver [8] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()301 // EdgeDriver [6] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()302 // OperaDriver [11] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()303 // SafariDriver [7] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()304 // AndroidDriver [51] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getPageSource()305 public static Set<?> getPageSource() {306 pureDriverDetails currentDriver = getCurrentDriverDetails();307 return (Set<?>)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getPageSource", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );308 }309 310 // ************************************************************************************************************************ getWindowHandles311 // WebDriver [6] = public abstract java.util.Set org.openqa.selenium.WebDriver.getWindowHandles()312 // ChromeDriver [19] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()313 // FireFoxDriver [10] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()314 // InternetExplorerDriver [9] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()315 // EdgeDriver [7] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()316 // OperaDriver [12] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()317 // SafariDriver [8] = public java.util.Set org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()318 // AndroidDriver [52] = public java.util.Set<java.lang.String> org.openqa.selenium.remote.RemoteWebDriver.getWindowHandles()319 public static Set<?> getWindowHandles() {320 pureDriverDetails currentDriver = getCurrentDriverDetails();321 return (Set<?>)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getWindowHandles", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );322 }323 324 // ************************************************************************************************************************ getWindowHandle325 // WebDriver [7] = public abstract java.lang.String org.openqa.selenium.WebDriver.getWindowHandle()326 // ChromeDriver [20] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()327 // FireFoxDriver [11] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()328 // InternetExplorerDriver [10] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()329 // EdgeDriver [8] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()330 // OperaDriver [13] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()331 // SafariDriver [9] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()332 // AndroidDriver [53] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.getWindowHandle()333 public static String getWindowHandle() {334 pureDriverDetails currentDriver = getCurrentDriverDetails();335 return (String)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getWindowHandle", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );336 }337 338 // ************************************************************************************************************************ switchTo339 // WebDriver [8] = public abstract org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.WebDriver.switchTo()340 // ChromeDriver [21] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()341 // FireFoxDriver [12] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()342 // InternetExplorerDriver [11] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()343 // EdgeDriver [9] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()344 // OperaDriver [14] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()345 // SafariDriver [10] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()346 // AndroidDriver [54] = public org.openqa.selenium.WebDriver$TargetLocator org.openqa.selenium.remote.RemoteWebDriver.switchTo()347 public static org.openqa.selenium.WebDriver.TargetLocator switchTo() {348 pureDriverDetails currentDriver = getCurrentDriverDetails();349 return (org.openqa.selenium.WebDriver.TargetLocator)pureCore.callMethod(350 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "switchTo", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );351 }352 // ************************************************************************************************************************ navigate353 // WebDriver [9] = public abstract org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.WebDriver.navigate()354 // ChromeDriver [22] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()355 // FireFoxDriver [13] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()356 // InternetExplorerDriver [12] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()357 // EdgeDriver [10] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()358 // OperaDriver [15] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()359 // SafariDriver [11] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()360 // AndroidDriver [55] = public org.openqa.selenium.WebDriver$Navigation org.openqa.selenium.remote.RemoteWebDriver.navigate()361 public static org.openqa.selenium.WebDriver.Navigation navigate() {362 pureDriverDetails currentDriver = getCurrentDriverDetails();363 return (org.openqa.selenium.WebDriver.Navigation)pureCore.callMethod(364 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "navigate", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );365 }366 // ************************************************************************************************************************ manage367 // WebDriver [10] = public abstract org.openqa.selenium.WebDriver$Options org.openqa.selenium.WebDriver.manage()368 // ChromeDriver [23] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()369 // FireFoxDriver [14] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()370 // InternetExplorerDriver [13] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()371 // EdgeDriver [11] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()372 // OperaDriver [16] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()373 // SafariDriver [12] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()374 // AndroidDriver [56] = public org.openqa.selenium.WebDriver$Options org.openqa.selenium.remote.RemoteWebDriver.manage()375 public static org.openqa.selenium.WebDriver.Options manage() {376 pureDriverDetails currentDriver = getCurrentDriverDetails();377 return (org.openqa.selenium.WebDriver.Options)pureCore.callMethod(378 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "manage", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );379 }380 381 // ************************************************************************************************************************ findElement (Return pureElement Object)382 // WebDriver [11] = public abstract org.openqa.selenium.WebElement org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)383 // ChromeDriver [17] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)384 // FireFoxDriver [15] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)385 // InternetExplorerDriver [14] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)386 // EdgeDriver [12] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)387 // OperaDriver [17] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)388 // SafariDriver [13] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)389 // AndroidDriver [11] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElement(org.openqa.selenium.By)390 public static pureElement findElement( org.openqa.selenium.By xPath ) {391 pureDriverDetails currentDriver = getCurrentDriverDetails();392 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElement", org.openqa.selenium.By.class, currentDriver.mainDriver.getClass().toString(), xPath );393 if ( SourceObject != null ) {394 pureCore.peMethod myMethod = pureCore.peMethodFromBy( xPath.toString() );395 pureElement newPureElement = new pureElement( "The Name", "The Type", myMethod.peMethodid, myMethod.peSearch, pureCore.defRefreshMode );396 newPureElement.theElement = SourceObject;397 newPureElement.refrehCode = "0xFFFFFFFF";398 return newPureElement;399 }else {400 return null;401 }402 }403 // ************************************************************************************************************************ findElement (Return Object for WebElement)404 // WebDriver [11] = public abstract org.openqa.selenium.WebElement org.openqa.selenium.WebDriver.findElement(org.openqa.selenium.By)405 // ChromeDriver [17] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)406 // FireFoxDriver [15] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)407 // InternetExplorerDriver [14] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)408 // EdgeDriver [12] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)409 // OperaDriver [17] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)410 // SafariDriver [13] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElement(org.openqa.selenium.By)411 // AndroidDriver [11] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElement(org.openqa.selenium.By)412 public static Object findElementWE( org.openqa.selenium.By xPath ) {413 pureDriverDetails currentDriver = getCurrentDriverDetails();414 return pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElement", org.openqa.selenium.By.class, currentDriver.mainDriver.getClass().toString(), xPath );415 }416 // ************************************************************************************************************************ findElement (Return Object for WebElement)417 // AndroidDriver [10] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElement(java.lang.String,java.lang.String)418 public static Object findElementWE( org.openqa.selenium.By xPath, pureDriverDetails driverToUse ) {419 return pureCore.callMethod( driverToUse.mainDriver, driverToUse.mainDriver.getClass(), "findElement", org.openqa.selenium.By.class, driverToUse.mainDriver.getClass().toString(), xPath );420 }421 422 // ************************************************************************************************************************ findElements423 // WebDriver [12] = public abstract java.util.List org.openqa.selenium.WebDriver.findElements(org.openqa.selenium.By)424 // ChromeDriver [16] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)425 // FireFoxDriver [16] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)426 // InternetExplorerDriver [15] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)427 // EdgeDriver [13] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)428 // OperaDriver [18] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)429 // SafariDriver [14] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElements(org.openqa.selenium.By)430 // AndroidDriver [30] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElements(org.openqa.selenium.By)431 public static pureElements findElements( org.openqa.selenium.By xPath ){432 pureDriverDetails currentDriver = getCurrentDriverDetails();433 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElements", org.openqa.selenium.By.class, currentDriver.mainDriver.getClass().toString(), xPath );434 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );435 if ( myObjectList != null ) {436 pureCore.peMethod myMethod = pureCore.peMethodFromBy( xPath.toString() );437 pureElements newPureElements = new pureElements( "-", "-", myMethod.peMethodid, myMethod.peSearch, pureCore.defRefreshMode );438 newPureElements.theElements = myObjectList;439 newPureElements.refrehCode = "0xFFFFFFFF";440 return newPureElements;441 }else {442 return null;443 }444 }445 // ************************************************************************************************************************ Location446 // ChromeDriver [0] = public org.openqa.selenium.html5.Location org.openqa.selenium.chrome.ChromeDriver.location()447 // OperaDriver [0] = public org.openqa.selenium.html5.Location org.openqa.selenium.opera.OperaDriver.location()448 // AndroidDriver [23] = public org.openqa.selenium.html5.Location io.appium.java_client.AppiumDriver.location()449 public org.openqa.selenium.html5.Location location() {450 pureDriverDetails currentDriver = getCurrentDriverDetails();451 return (org.openqa.selenium.html5.Location)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "location", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );452 }453 454 // ************************************************************************************************************************ setFileDetector455 // ChromeDriver [1] = public void org.openqa.selenium.chrome.ChromeDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)456 // FireFoxDriver [1] = public void org.openqa.selenium.firefox.FirefoxDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)457 // InternetExplorerDriver [0] = public void org.openqa.selenium.ie.InternetExplorerDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)458 // EdgeDriver [14] = public void org.openqa.selenium.remote.RemoteWebDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)459 // OperaDriver [2] = public void org.openqa.selenium.opera.OperaDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)460 // SafariDriver [0] = public void org.openqa.selenium.safari.SafariDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)461 // AndroidDriver [57] = public void org.openqa.selenium.remote.RemoteWebDriver.setFileDetector(org.openqa.selenium.remote.FileDetector)462 public void setFileDetector( org.openqa.selenium.remote.FileDetector myFileDetector ) {463 pureDriverDetails currentDriver = getCurrentDriverDetails();464 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "setFileDetector", org.openqa.selenium.remote.FileDetector.class,465 "pureDrivers.setFileDetector", (Object)myFileDetector );466 }467 468 // ************************************************************************************************************************ getLocalStorage469 // ChromeDriver [2] = public org.openqa.selenium.html5.LocalStorage org.openqa.selenium.chrome.ChromeDriver.getLocalStorage()470 // FireFoxDriver [2] = public org.openqa.selenium.html5.LocalStorage org.openqa.selenium.firefox.FirefoxDriver.getLocalStorage()471 // OperaDriver [3] = public org.openqa.selenium.html5.LocalStorage org.openqa.selenium.opera.OperaDriver.getLocalStorage()472 public org.openqa.selenium.html5.LocalStorage getLocalStorage() {473 pureDriverDetails currentDriver = getCurrentDriverDetails();474 return (org.openqa.selenium.html5.LocalStorage)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "location", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );475 }476 // ************************************************************************************************************************ setLocation477 // ChromeDriver [3] = public void org.openqa.selenium.chrome.ChromeDriver.setLocation(org.openqa.selenium.html5.Location)478 // OperaDriver [4] = public void org.openqa.selenium.opera.OperaDriver.setLocation(org.openqa.selenium.html5.Location)479 // AndroidDriver [31] = public void io.appium.java_client.AppiumDriver.setLocation(org.openqa.selenium.html5.Location)480 public void setLocation( org.openqa.selenium.html5.Location myLocation ) {481 pureDriverDetails currentDriver = getCurrentDriverDetails();482 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "setLocation", org.openqa.selenium.html5.Location.class, currentDriver.mainDriver.getClass().toString(), (Object)myLocation );483 }484 485 // ************************************************************************************************************************ getTouch486 // ChromeDriver [4] = public org.openqa.selenium.interactions.TouchScreen org.openqa.selenium.chrome.ChromeDriver.getTouch()487 public org.openqa.selenium.interactions.TouchScreen getTouch() {488 pureDriverDetails currentDriver = getCurrentDriverDetails();489 return (org.openqa.selenium.interactions.TouchScreen)pureCore.callMethod(490 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getTouch", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );491 }492 // ************************************************************************************************************************ launchApp493 // ChromeDriver [5] = public void org.openqa.selenium.chrome.ChromeDriver.launchApp(java.lang.String)494 // AndroidDriver [84] = public default void io.appium.java_client.InteractsWithApps.launchApp()495 public void launchApp( String inPut ) {496 pureDriverDetails currentDriver = getCurrentDriverDetails();497 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "launchApp" , java.lang.String.class, currentDriver.mainDriver.getClass().toString(), inPut );498 }499 500 // ************************************************************************************************************************ getSessionStorage501 // ChromeDriver [6] = public org.openqa.selenium.html5.SessionStorage org.openqa.selenium.chrome.ChromeDriver.getSessionStorage()502 // FireFoxDriver [0] = public org.openqa.selenium.html5.SessionStorage org.openqa.selenium.firefox.FirefoxDriver.getSessionStorage()503 // OperaDriver [1] = public org.openqa.selenium.html5.SessionStorage org.openqa.selenium.opera.OperaDriver.getSessionStorage()504 public org.openqa.selenium.html5.SessionStorage getSessionStorage() {505 pureDriverDetails currentDriver = getCurrentDriverDetails();506 return (org.openqa.selenium.html5.SessionStorage)pureCore.callMethod(507 currentDriver.mainDriver, currentDriver.mainDriver.getClass(),"getSesionStorage", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );508 }509 // ************************************************************************************************************************ getNetworkConnection510 // ChromeDriver [7] = public org.openqa.selenium.mobile.NetworkConnection$ConnectionType org.openqa.selenium.chrome.ChromeDriver.getNetworkConnection()511 public org.openqa.selenium.mobile.NetworkConnection.ConnectionType getNetworkConnection() {512 pureDriverDetails currentDriver = getCurrentDriverDetails();513 return (org.openqa.selenium.mobile.NetworkConnection.ConnectionType)pureCore.callMethod(514 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getNetworkConnection", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null ); 515 }516 517 // ************************************************************************************************************************ setNetworkConnection518 // ChromeDriver [8] = public org.openqa.selenium.mobile.NetworkConnection$ConnectionType org.openqa.selenium.chrome.ChromeDriver.setNetworkConnection(org.openqa.selenium.mobile.NetworkConnection$ConnectionType)519 public org.openqa.selenium.mobile.NetworkConnection.ConnectionType setNetworkConnection( org.openqa.selenium.mobile.NetworkConnection.ConnectionType myConnection ) {520 pureDriverDetails currentDriver = getCurrentDriverDetails();521 return (org.openqa.selenium.mobile.NetworkConnection.ConnectionType)pureCore.callMethod(522 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getNetworkConnection", org.openqa.selenium.mobile.NetworkConnection.ConnectionType.class, currentDriver.mainDriver.getClass().toString(), myConnection ); 523 }524 525 // ************************************************************************************************************************ toStringL526 // ChromeDriver [10] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()527 // FireFoxDriver [4] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()528 // InternetExplorerDriver [3] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()529 // EdgeDriver [1] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()530 // OperaDriver [6] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()531 // SafariDriver [2] = public java.lang.String org.openqa.selenium.remote.RemoteWebDriver.toString()532 // AndroidDriver [0] = public java.lang.String io.appium.java_client.android.AndroidDriver.toString()533 public String toStringL() {534 pureDriverDetails currentDriver = getCurrentDriverDetails();535 return (String)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "toString", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );536 }537 538 // ************************************************************************************************************************ getSessionId539 // ChromeDriver [12] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()540 // FireFoxDriver [17] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()541 // InternetExplorerDriver [16] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()542 // EdgeDriver [15] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()543 // OperaDriver [19] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()544 // SafariDriver [15] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()545 // AndroidDriver [58] = public org.openqa.selenium.remote.SessionId org.openqa.selenium.remote.RemoteWebDriver.getSessionId()546 public org.openqa.selenium.remote.SessionId getSessionId() {547 pureDriverDetails currentDriver = getCurrentDriverDetails();548 return (org.openqa.selenium.remote.SessionId)pureCore.callMethod(549 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getSessionId", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );550 }551 552 // ************************************************************************************************************************ getErrorHandler553 // ChromeDriver [24] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()554 // FireFoxDriver [18] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()555 // InternetExplorerDriver [17] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()556 // EdgeDriver [16] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()557 // OperaDriver [20] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()558 // SafariDriver [16] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()559 // AndroidDriver [59] = public org.openqa.selenium.remote.ErrorHandler org.openqa.selenium.remote.RemoteWebDriver.getErrorHandler()560 public org.openqa.selenium.remote.ErrorHandler getErrorHandler() {561 pureDriverDetails currentDriver = getCurrentDriverDetails();562 return (org.openqa.selenium.remote.ErrorHandler)pureCore.callMethod(563 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getErrorHandler", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );564 }565 // ************************************************************************************************************************ setErrorHandler566 // ChromeDriver [25] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)567 // FireFoxDriver [19] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)568 // InternetExplorerDriver [18] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)569 // EdgeDriver [17] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)570 // OperaDriver [21] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)571 // SafariDriver [17] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)572 // AndroidDriver [60] = public void org.openqa.selenium.remote.RemoteWebDriver.setErrorHandler(org.openqa.selenium.remote.ErrorHandler)573 public void setErrorHandler( org.openqa.selenium.remote.ErrorHandler theError ) {574 pureDriverDetails currentDriver = getCurrentDriverDetails();575 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "setErrorHandler", org.openqa.selenium.remote.ErrorHandler.class, currentDriver.mainDriver.getClass().toString(), theError );576 }577 // ************************************************************************************************************************ getCapabilities578 // ChromeDriver [26] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()579 // FireFoxDriver [20] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()580 // InternetExplorerDriver [19] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()581 // EdgeDriver [18] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()582 // OperaDriver [22] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()583 // SafariDriver [18] = public org.openqa.selenium.Capabilities org.openqa.selenium.remote.RemoteWebDriver.getCapabilities()584 // AndroidDriver [12] = public org.openqa.selenium.Capabilities io.appium.java_client.android.AndroidDriver.getCapabilities()585 public org.openqa.selenium.Capabilities getCapabilities() {586 pureDriverDetails currentDriver = getCurrentDriverDetails();587 return (org.openqa.selenium.Capabilities)pureCore.callMethod(588 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getCapabilities", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );589 }590 591 // ************************************************************************************************************************ getScreenshotAs592 // ChromeDriver [27] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType) throws org.openqa.selenium.WebDriverException593 // FireFoxDriver [21] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType) throws org.openqa.selenium.WebDriverException594 // InternetExplorerDriver [1] = public java.lang.Object org.openqa.selenium.ie.InternetExplorerDriver.getScreenshotAs(org.openqa.selenium.OutputType)595 // EdgeDriver [19] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType) throws org.openqa.selenium.WebDriverException596 // OperaDriver [23] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType) throws org.openqa.selenium.WebDriverException597 // SafariDriver [19] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType) throws org.openqa.selenium.WebDriverException598 // AndroidDriver [61] = public <X> X org.openqa.selenium.remote.RemoteWebDriver.getScreenshotAs(org.openqa.selenium.OutputType<X>) throws org.openqa.selenium.WebDriverException599 public Object getScreenshotAs( org.openqa.selenium.OutputType<?> file ) throws WebDriverException{600 pureDriverDetails currentDriver = getCurrentDriverDetails();601 return pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getScreenshotAs", org.openqa.selenium.OutputType.class, currentDriver.mainDriver.getClass().toString(), file );602 }603 // ************************************************************************************************************************ executeScript604 // ChromeDriver [30] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])605 // FireFoxDriver [22] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])606 // InternetExplorerDriver [20] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])607 // EdgeDriver [20] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])608 // OperaDriver [24] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])609 // SafariDriver [20] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object[])610 // AndroidDriver [62] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeScript(java.lang.String,java.lang.Object...)611 public Object executeScript( String Str1, Object[] myObjectList ){612 pureDriverDetails currentDriver = getCurrentDriverDetails();613 //614 Class<?>[] myClasses = new Class[2];615 myClasses[ 0 ] = java.lang.String.class;616 myClasses[ 1 ] = java.lang.Object[].class;617 //618 Object[] myTrueParam = new Object[2];619 myTrueParam[ 0 ] = (Object)Str1;620 myTrueParam[ 1 ] = myObjectList;621 //622 return pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "executeScript", myClasses, currentDriver.mainDriver.getClass().toString(), myTrueParam );623 }624 625 // ************************************************************************************************************************ setLogLevel626 // ChromeDriver [31] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)627 // FireFoxDriver [23] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)628 // InternetExplorerDriver [21] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)629 // EdgeDriver [21] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)630 // OperaDriver [25] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)631 // SafariDriver [21] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)632 // AndroidDriver [63] = public void org.openqa.selenium.remote.RemoteWebDriver.setLogLevel(java.util.logging.Level)633 public void setLogLevel( java.util.logging.Level logLevel ) {634 pureDriverDetails currentDriver = getCurrentDriverDetails();635 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "setLogLevel", java.util.logging.Level.class , currentDriver.mainDriver.getClass().toString(), logLevel );636 }637 // ************************************************************************************************************************ perform638 // ChromeDriver [32] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)639 // FireFoxDriver [24] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)640 // InternetExplorerDriver [22] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)641 // EdgeDriver [22] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)642 // OperaDriver [26] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)643 // SafariDriver [22] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection)644 // AndroidDriver [64] = public void org.openqa.selenium.remote.RemoteWebDriver.perform(java.util.Collection<org.openqa.selenium.interactions.Sequence>)645 public void perform( java.util.Collection<?> mCollection ) {646 pureDriverDetails currentDriver = getCurrentDriverDetails();647 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "perform", java.util.Collection.class , currentDriver.mainDriver.getClass().toString(), mCollection );648 }649 650 // ************************************************************************************************************************ resetInputState651 // ChromeDriver [33] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()652 // FireFoxDriver [25] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()653 // InternetExplorerDriver [23] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()654 // EdgeDriver [23] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()655 // OperaDriver [27] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()656 // SafariDriver [23] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()657 // AndroidDriver [65] = public void org.openqa.selenium.remote.RemoteWebDriver.resetInputState()658 public void resetInputState() {659 pureDriverDetails currentDriver = getCurrentDriverDetails();660 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "perform", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );661 662 }663 // ************************************************************************************************************************ getKeyboard664 // ChromeDriver [34] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()665 // FireFoxDriver [26] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()666 // InternetExplorerDriver [24] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()667 // EdgeDriver [24] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()668 // OperaDriver [28] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()669 // SafariDriver [24] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()670 // AndroidDriver [66] = public org.openqa.selenium.interactions.Keyboard org.openqa.selenium.remote.RemoteWebDriver.getKeyboard()671 public org.openqa.selenium.interactions.Keyboard getKeyboard(){672 pureDriverDetails currentDriver = getCurrentDriverDetails();673 return (org.openqa.selenium.interactions.Keyboard)pureCore.callMethod(674 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getKeyboard", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );675 }676 677 // ************************************************************************************************************************ getMouse678 // ChromeDriver [35] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()679 // FireFoxDriver [27] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()680 // InternetExplorerDriver [25] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()681 // EdgeDriver [25] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()682 // OperaDriver [29] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()683 // SafariDriver [25] = public org.openqa.selenium.interactions.Mouse org.openqa.selenium.remote.RemoteWebDriver.getMouse()684 // AndroidDriver [13] = public org.openqa.selenium.interactions.Mouse io.appium.java_client.android.AndroidDriver.getMouse()685 public org.openqa.selenium.interactions.Mouse getMouse(){686 pureDriverDetails currentDriver = getCurrentDriverDetails();687 return (org.openqa.selenium.interactions.Mouse)pureCore.callMethod(688 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getMouse", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );689 }690 691 // ************************************************************************************************************************ getFileDetector692 // ChromeDriver [36] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()693 // FireFoxDriver [28] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()694 // InternetExplorerDriver [26] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()695 // EdgeDriver [26] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()696 // OperaDriver [30] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()697 // SafariDriver [26] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()698 // AndroidDriver [67] = public org.openqa.selenium.remote.FileDetector org.openqa.selenium.remote.RemoteWebDriver.getFileDetector()699 public org.openqa.selenium.remote.FileDetector getFileDetector(){700 pureDriverDetails currentDriver = getCurrentDriverDetails();701 return (org.openqa.selenium.remote.FileDetector)pureCore.callMethod(702 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getFileDetector", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );703 }704 // ************************************************************************************************************************ getCommandExecutor705 // ChromeDriver [37] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()706 // FireFoxDriver [29] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()707 // InternetExplorerDriver [27] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()708 // EdgeDriver [27] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()709 // OperaDriver [31] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()710 // SafariDriver [27] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()711 // AndroidDriver [47] = public org.openqa.selenium.remote.CommandExecutor org.openqa.selenium.remote.RemoteWebDriver.getCommandExecutor()712 public org.openqa.selenium.remote.CommandExecutor getCommandExecutor(){713 pureDriverDetails currentDriver = getCurrentDriverDetails();714 return (org.openqa.selenium.remote.CommandExecutor)pureCore.callMethod(715 currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getCommandExecutor", (Class<?>)null , currentDriver.mainDriver.getClass().toString(), (Object)null );716 }717 // ************************************************************************************************************************ executeAsyncScript718 // ChromeDriver [52] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])719 // FireFoxDriver [30] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])720 // InternetExplorerDriver [28] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])721 // EdgeDriver [28] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])722 // OperaDriver [32] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])723 // SafariDriver [28] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object[])724 // AndroidDriver [48] = public java.lang.Object org.openqa.selenium.remote.RemoteWebDriver.executeAsyncScript(java.lang.String,java.lang.Object...)725 public Object executeAsyncScript( String Str1, Object[] myObjectList ){726 pureDriverDetails currentDriver = getCurrentDriverDetails();727 //728 Class<?>[] myClasses = new Class[2];729 myClasses[ 0 ] = java.lang.String.class;730 myClasses[ 1 ] = java.lang.Object[].class;731 //732 Object[] myTrueParam = new Object[2];733 myTrueParam[ 0 ] = (Object)Str1;734 myTrueParam[ 1 ] = myObjectList;735 //736 return pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "executeScript", myClasses, currentDriver.mainDriver.getClass().toString(), myTrueParam );737 }738 // ************************************************************************************************************************ wait739 // ChromeDriver [53] = public final void java.lang.Object.wait() throws java.lang.InterruptedException740 // FireFoxDriver [47] = public final void java.lang.Object.wait() throws java.lang.InterruptedException741 // InternetExplorerDriver [45] = public final void java.lang.Object.wait() throws java.lang.InterruptedException742 // EdgeDriver [45] = public final void java.lang.Object.wait() throws java.lang.InterruptedException743 // OperaDriver [49] = public final void java.lang.Object.wait() throws java.lang.InterruptedException744 // SafariDriver [45] = public final void java.lang.Object.wait() throws java.lang.InterruptedException745 // AndroidDriver [68] = public final void java.lang.Object.wait() throws java.lang.InterruptedException746 public void waitD(){747 pureDriverDetails currentDriver = getCurrentDriverDetails();748 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "wait", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );749 }750 // ************************************************************************************************************************ waitD751 // ChromeDriver [54] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException752 // FireFoxDriver [48] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException753 // InternetExplorerDriver [46] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException754 // EdgeDriver [46] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException755 // OperaDriver [50] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException756 // SafariDriver [46] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException757 // AndroidDriver [69] = public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException758 public void waitD( long TimeL, int TimeI ){759 pureDriverDetails currentDriver = getCurrentDriverDetails();760 //761 Class<?>[] myClasses = new Class[2];762 myClasses[ 0 ] = long.class;763 myClasses[ 1 ] = int.class;764 //765 Object[] myTrueParam = new Object[2];766 myTrueParam[ 0 ] = (Object)TimeL;767 myTrueParam[ 1 ] = (Object)TimeI;768 //769 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "wait", myClasses, currentDriver.mainDriver.getClass().toString(), myTrueParam );770 }771 772 // ************************************************************************************************************************ waitD773 // ChromeDriver [55] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException774 // FireFoxDriver [49] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException775 // InternetExplorerDriver [47] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException776 // EdgeDriver [47] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException777 // OperaDriver [51] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException778 // SafariDriver [47] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException779 // AndroidDriver [70] = public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException780 public void waitD( long TimeL ){781 pureDriverDetails currentDriver = getCurrentDriverDetails();782 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "wait", long.class, currentDriver.mainDriver.getClass().toString(), (Object)TimeL );783 }784 // ************************************************************************************************************************ equalsL785 // ChromeDriver [56] = public boolean java.lang.Object.equals(java.lang.Object)786 // FireFoxDriver [50] = public boolean java.lang.Object.equals(java.lang.Object)787 // InternetExplorerDriver [48] = public boolean java.lang.Object.equals(java.lang.Object)788 // EdgeDriver [48] = public boolean java.lang.Object.equals(java.lang.Object)789 // OperaDriver [52] = public boolean java.lang.Object.equals(java.lang.Object)790 // SafariDriver [48] = public boolean java.lang.Object.equals(java.lang.Object)791 // AndroidDriver [71] = public boolean java.lang.Object.equals(java.lang.Object)792 public boolean equalsL( Object ObjectToCompare ) {793 pureDriverDetails currentDriver = getCurrentDriverDetails();794 return (boolean)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "equals", Object.class, currentDriver.mainDriver.getClass().toString(), ObjectToCompare );795 }796 797 // ************************************************************************************************************************ hashCodeD798 // ChromeDriver [57] = public native int java.lang.Object.hashCode()799 // FireFoxDriver [51] = public native int java.lang.Object.hashCode()800 // InternetExplorerDriver [49] = public native int java.lang.Object.hashCode()801 // EdgeDriver [49] = public native int java.lang.Object.hashCode()802 // OperaDriver [53] = public native int java.lang.Object.hashCode()803 // SafariDriver [49] = public native int java.lang.Object.hashCode()804 // AndroidDriver [72] = public native int java.lang.Object.hashCode()805 public int hashCodeD(){806 pureDriverDetails currentDriver = getCurrentDriverDetails();807 return (int)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "hashCode", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );808 }809 810 // ************************************************************************************************************************ getClassD811 // ChromeDriver [58] = public final native java.lang.Class java.lang.Object.getClass()812 // FireFoxDriver [52] = public final native java.lang.Class java.lang.Object.getClass()813 // InternetExplorerDriver [50] = public final native java.lang.Class java.lang.Object.getClass()814 // EdgeDriver [50] = public final native java.lang.Class java.lang.Object.getClass()815 // OperaDriver [54] = public final native java.lang.Class java.lang.Object.getClass()816 // SafariDriver [50] = public final native java.lang.Class java.lang.Object.getClass()817 // AndroidDriver [73] = public final native java.lang.Class<?> java.lang.Object.getClass()818 public Class<?> getClassD(){819 pureDriverDetails currentDriver = getCurrentDriverDetails();820 return (Class<?>)pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "getClass", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );821 }822 823 // ************************************************************************************************************************ notifyD824 // ChromeDriver [59] = public final native void java.lang.Object.notify()825 // FireFoxDriver [53] = public final native void java.lang.Object.notify()826 // InternetExplorerDriver [51] = public final native void java.lang.Object.notify()827 // EdgeDriver [51] = public final native void java.lang.Object.notify()828 // OperaDriver [55] = public final native void java.lang.Object.notify()829 // SafariDriver [51] = public final native void java.lang.Object.notify()830 // AndroidDriver [74] = public final native void java.lang.Object.notify()831 public void notifyD(){832 pureDriverDetails currentDriver = getCurrentDriverDetails();833 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "notify", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );834 }835 // ************************************************************************************************************************ notifyAllD836 // ChromeDriver [60] = public final native void java.lang.Object.notifyAll()837 // FireFoxDriver [54] = public final native void java.lang.Object.notifyAll() public boolean equalsL( Object ObjectToCompare ) {838 // InternetExplorerDriver [52] = public final native void java.lang.Object.notifyAll()839 // EdgeDriver [52] = public final native void java.lang.Object.notifyAll()840 // OperaDriver [56] = public final native void java.lang.Object.notifyAll()841 // SafariDriver [52] = public final native void java.lang.Object.notifyAll()842 // AndroidDriver [75] = public final native void java.lang.Object.notifyAll()843 public void notifyAllD(){844 pureDriverDetails currentDriver = getCurrentDriverDetails();845 pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "notifyAll", (Class<?>)null, currentDriver.mainDriver.getClass().toString(), (Object)null );846 }847 // ************************************************************************************************************************ findElementById848 // ChromeDriver [28] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)849 // FireFoxDriver [45] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)850 // InternetExplorerDriver [43] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)851 // EdgeDriver [43] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)852 // OperaDriver [47] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)853 // SafariDriver [43] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementById(java.lang.String)854 // AndroidDriver [14] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementById(java.lang.String)855 public pureElement findElementById( String objectID ) {856 pureDriverDetails currentDriver = getCurrentDriverDetails();857 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementById", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), objectID );858 if ( SourceObject != null ) {859 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.id, objectID, pureCore.defRefreshMode );860 newPureElement.theElement = SourceObject;861 newPureElement.refrehCode = "0xFFFFFFFF";862 return newPureElement;863 }else {864 return null;865 }866 }867 // ************************************************************************************************************************ findElementByLinkText868 // ChromeDriver [38] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)869 // FireFoxDriver [31] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)870 // InternetExplorerDriver [29] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)871 // EdgeDriver [29] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)872 // OperaDriver [33] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)873 // SafariDriver [29] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText(java.lang.String)874 // AndroidDriver [3] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByLinkText(java.lang.String) throws org.openqa.selenium.WebDriverException875 public pureElement findElementByLinkText( String ObjectLinkText ){876 pureDriverDetails currentDriver = getCurrentDriverDetails();877 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByLinkText", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), ObjectLinkText );878 if ( SourceObject != null ) {879 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.linkText, ObjectLinkText, pureCore.defRefreshMode );880 newPureElement.theElement = SourceObject;881 newPureElement.refrehCode = "0xFFFFFFFF";882 return newPureElement;883 }else {884 return null;885 }886 }887 888 // ************************************************************************************************************************ findElementByPartialLinkText889 // ChromeDriver [40] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)890 // FireFoxDriver [32] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)891 // InternetExplorerDriver [30] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)892 // EdgeDriver [30] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)893 // OperaDriver [34] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)894 // SafariDriver [30] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText(java.lang.String)895 // AndroidDriver [4] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByPartialLinkText(java.lang.String) throws org.openqa.selenium.WebDriverException896 public pureElement findElementByPartialLinkText( String ObjectLinkText ){897 pureDriverDetails currentDriver = getCurrentDriverDetails();898 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByPartialLinkText", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), ObjectLinkText );899 if ( SourceObject != null ) {900 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.partialLinkText, ObjectLinkText, pureCore.defRefreshMode );901 newPureElement.theElement = SourceObject;902 newPureElement.refrehCode = "0xFFFFFFFF";903 return newPureElement;904 }else {905 return null;906 }907 }908 // ************************************************************************************************************************ findElementByTagName909 // ChromeDriver [42] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)910 // FireFoxDriver [33] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)911 // InternetExplorerDriver [31] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)912 // EdgeDriver [31] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)913 // OperaDriver [35] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)914 // SafariDriver [31] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(java.lang.String)915 // AndroidDriver [5] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByTagName(java.lang.String)916 public pureElement findElementByTagName( String TagName ){917 pureDriverDetails currentDriver = getCurrentDriverDetails();918 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByTagName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), TagName );919 if ( SourceObject != null ) {920 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.tagNamei, TagName, pureCore.defRefreshMode );921 newPureElement.theElement = SourceObject;922 newPureElement.refrehCode = "0xFFFFFFFF";923 return newPureElement;924 }else {925 return null;926 }927 }928 // ************************************************************************************************************************ findElementByName929 // ChromeDriver [44] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)930 // FireFoxDriver [34] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)931 // InternetExplorerDriver [32] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)932 // EdgeDriver [32] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)933 // OperaDriver [36] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)934 // SafariDriver [32] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByName(java.lang.String)935 // AndroidDriver [6] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByName(java.lang.String)936 public pureElement findElementByName( String Name ){937 pureDriverDetails currentDriver = getCurrentDriverDetails();938 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Name );939 if ( SourceObject != null ) {940 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.name, Name, pureCore.defRefreshMode );941 newPureElement.theElement = SourceObject;942 newPureElement.refrehCode = "0xFFFFFFFF";943 return newPureElement;944 }else {945 return null;946 }947 }948 // ************************************************************************************************************************ findElementByClassName949 // ChromeDriver [46] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)950 // FireFoxDriver [35] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)951 // InternetExplorerDriver [33] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)952 // EdgeDriver [33] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)953 // OperaDriver [37] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)954 // SafariDriver [33] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName(java.lang.String)955 // AndroidDriver [7] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByClassName(java.lang.String)956 public pureElement findElementByClassName( String ClassName ){957 pureDriverDetails currentDriver = getCurrentDriverDetails();958 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByClassName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), ClassName );959 if ( SourceObject != null ) {960 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.className, ClassName, pureCore.defRefreshMode );961 newPureElement.theElement = SourceObject;962 newPureElement.refrehCode = "0xFFFFFFFF";963 return newPureElement;964 }else {965 return null;966 }967 }968 // ************************************************************************************************************************ findElementByCssSelector969 // ChromeDriver [48] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)970 // FireFoxDriver [36] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)971 // InternetExplorerDriver [34] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)972 // EdgeDriver [34] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)973 // OperaDriver [38] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)974 // SafariDriver [34] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector(java.lang.String)975 // AndroidDriver [8] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByCssSelector(java.lang.String) throws org.openqa.selenium.WebDriverException976 public pureElement findElementByCssSelector( String ObjectLinkText ){977 pureDriverDetails currentDriver = getCurrentDriverDetails();978 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByLinkText", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), ObjectLinkText );979 if ( SourceObject != null ) {980 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.linkText, ObjectLinkText, pureCore.defRefreshMode );981 newPureElement.theElement = SourceObject;982 newPureElement.refrehCode = "0xFFFFFFFF";983 return newPureElement;984 }else {985 return null;986 }987 }988 // ************************************************************************************************************************ findElementByXPath989 // ChromeDriver [50] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)990 // FireFoxDriver [37] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)991 // InternetExplorerDriver [35] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)992 // EdgeDriver [35] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)993 // OperaDriver [39] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)994 // SafariDriver [35] = public org.openqa.selenium.WebElement org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(java.lang.String)995 // AndroidDriver [9] = public org.openqa.selenium.WebElement io.appium.java_client.android.AndroidDriver.findElementByXPath(java.lang.String)996 public pureElement findElementByXPath( String xPath ){997 pureDriverDetails currentDriver = getCurrentDriverDetails();998 Object SourceObject = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementByXPath", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), xPath );999 if ( SourceObject != null ) {1000 pureElement newPureElement = new pureElement( "-", "-", pureCore.elementMethod.xpath, xPath, pureCore.defRefreshMode );1001 newPureElement.theElement = SourceObject;1002 newPureElement.refrehCode = "0xFFFFFFFF";1003 return newPureElement;1004 }else {1005 return null;1006 }1007 }1008 // ************************************************************************************************************************ findElementsById1009 // ChromeDriver [29] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1010 // FireFoxDriver [46] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1011 // InternetExplorerDriver [44] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1012 // EdgeDriver [44] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1013 // OperaDriver [48] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1014 // SafariDriver [44] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsById(java.lang.String)1015 // AndroidDriver [32] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsById(java.lang.String)1016 public pureElements findElementsById( String Search ){1017 pureDriverDetails currentDriver = getCurrentDriverDetails();1018 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsById", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1019 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1020 if ( myObjectList != null ) {1021 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.id, Search, pureCore.defRefreshMode );1022 newPureElements.theElements = myObjectList;1023 newPureElements.refrehCode = "0xFFFFFFFF";1024 return newPureElements;1025 }else {1026 return null;1027 }1028 }1029 1030 // ************************************************************************************************************************ findElementsByLinkText1031 // ChromeDriver [39] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1032 // FireFoxDriver [38] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1033 // InternetExplorerDriver [36] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1034 // EdgeDriver [36] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1035 // OperaDriver [40] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1036 // SafariDriver [36] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText(java.lang.String)1037 // AndroidDriver [26] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByLinkText(java.lang.String)1038 public pureElements findElementsByLinkText( String Search ){1039 pureDriverDetails currentDriver = getCurrentDriverDetails();1040 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByLinkText", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1041 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1042 if ( myObjectList != null ) {1043 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.linkText, Search, pureCore.defRefreshMode );1044 newPureElements.theElements = myObjectList;1045 newPureElements.refrehCode = "0xFFFFFFFF";1046 return newPureElements;1047 }else {1048 return null;1049 }1050 }1051 // ************************************************************************************************************************ findelementsByPartialLinkText1052 // ChromeDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1053 // FireFoxDriver [39] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1054 // InternetExplorerDriver [37] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1055 // EdgeDriver [37] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1056 // OperaDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1057 // SafariDriver [37] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText(java.lang.String)1058 // AndroidDriver [27] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByPartialLinkText(java.lang.String)1059 public pureElements findElementsByPartialLinkText( String Search ){1060 pureDriverDetails currentDriver = getCurrentDriverDetails();1061 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByPartialLinkText", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1062 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1063 if ( myObjectList != null ) {1064 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.partialLinkText, Search, pureCore.defRefreshMode );1065 newPureElements.theElements = myObjectList;1066 newPureElements.refrehCode = "0xFFFFFFFF";1067 return newPureElements;1068 }else {1069 return null;1070 }1071 }1072 // ************************************************************************************************************************ findElementsByTagName1073 // ChromeDriver [43] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1074 // FireFoxDriver [40] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1075 // InternetExplorerDriver [38] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1076 // EdgeDriver [38] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1077 // OperaDriver [42] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1078 // SafariDriver [38] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName(java.lang.String)1079 // AndroidDriver [28] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByTagName(java.lang.String)1080 public pureElements findElementsByTagName( String Search ){1081 pureDriverDetails currentDriver = getCurrentDriverDetails();1082 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByTagName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1083 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1084 if ( myObjectList != null ) {1085 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.tagNamei, Search, pureCore.defRefreshMode );1086 newPureElements.theElements = myObjectList;1087 newPureElements.refrehCode = "0xFFFFFFFF";1088 return newPureElements;1089 }else {1090 return null;1091 }1092 }1093 // ************************************************************************************************************************ findElementsByName1094 // ChromeDriver [45] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1095 // FireFoxDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1096 // InternetExplorerDriver [39] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1097 // EdgeDriver [39] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1098 // OperaDriver [43] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1099 // SafariDriver [39] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByName(java.lang.String)1100 // AndroidDriver [33] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByName(java.lang.String)1101 public pureElements findElementsByName( String Search ){1102 pureDriverDetails currentDriver = getCurrentDriverDetails();1103 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1104 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1105 if ( myObjectList != null ) {1106 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.name, Search, pureCore.defRefreshMode );1107 newPureElements.theElements = myObjectList;1108 newPureElements.refrehCode = "0xFFFFFFFF";1109 return newPureElements;1110 }else {1111 return null;1112 }1113 }1114 // ************************************************************************************************************************ findElementsByClassName 1115 // ChromeDriver [47] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1116 // FireFoxDriver [42] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1117 // InternetExplorerDriver [40] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1118 // EdgeDriver [40] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1119 // OperaDriver [44] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1120 // SafariDriver [40] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName(java.lang.String)1121 // AndroidDriver [34] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByClassName(java.lang.String)1122 public pureElements findElementsByClassName( String Search ){1123 pureDriverDetails currentDriver = getCurrentDriverDetails();1124 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByClassName", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1125 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1126 if ( myObjectList != null ) {1127 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.className, Search, pureCore.defRefreshMode );1128 newPureElements.theElements = myObjectList;1129 newPureElements.refrehCode = "0xFFFFFFFF";1130 return newPureElements;1131 }else {1132 return null;1133 }1134 }1135 // ************************************************************************************************************************ findElementsByCssSelector1136 // ChromeDriver [49] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1137 // FireFoxDriver [43] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1138 // InternetExplorerDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1139 // EdgeDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1140 // OperaDriver [45] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1141 // SafariDriver [41] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector(java.lang.String)1142 // AndroidDriver [35] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByCssSelector(java.lang.String)1143 public pureElements findElementsByCssSelector( String Search ){1144 pureDriverDetails currentDriver = getCurrentDriverDetails();1145 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByCssSelector", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1146 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1147 if ( myObjectList != null ) {1148 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.cssSelector, Search, pureCore.defRefreshMode );1149 newPureElements.theElements = myObjectList;1150 newPureElements.refrehCode = "0xFFFFFFFF";1151 return newPureElements;1152 }else {1153 return null;1154 }1155 }1156 // ************************************************************************************************************************ findElementsByXPath 1157 // ChromeDriver [51] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1158 // FireFoxDriver [44] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1159 // InternetExplorerDriver [42] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1160 // EdgeDriver [42] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1161 // OperaDriver [46] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1162 // SafariDriver [42] = public java.util.List org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath(java.lang.String)1163 // AndroidDriver [36] = public java.util.List<T> io.appium.java_client.AppiumDriver.findElementsByXPath(java.lang.String)1164 public pureElements findElementsByXPath( String Search ){1165 pureDriverDetails currentDriver = getCurrentDriverDetails();1166 Object feedback = pureCore.callMethod( currentDriver.mainDriver, currentDriver.mainDriver.getClass(), "findElementsByXPath", java.lang.String.class, currentDriver.mainDriver.getClass().toString(), Search );1167 List<Object> myObjectList = pureCore.CastObjecttoList( feedback );1168 if ( myObjectList != null ) {1169 pureElements newPureElements = new pureElements( "-", "-", pureCore.elementMethod.xpath, Search, pureCore.defRefreshMode );1170 newPureElements.theElements = myObjectList;1171 newPureElements.refrehCode = "0xFFFFFFFF";1172 return newPureElements;1173 }else {1174 return null;1175 }1176 }...

Full Screen

Full Screen

Source:NLPerfectoWebDriver.java Github

copy

Full Screen

...38import org.openqa.selenium.interactions.Mouse;39import org.openqa.selenium.remote.CommandExecutor;40import org.openqa.selenium.remote.ErrorHandler;41import org.openqa.selenium.remote.FileDetector;42import org.openqa.selenium.remote.RemoteWebDriver;43import org.openqa.selenium.remote.SessionId;44import com.neotys.selenium.proxies.helpers.WrapperUtils;45public class NLPerfectoWebDriver extends NLRemoteWebDriver{46 47 private final RemoteWebDriver remoteWebDriver;48 private final NLWebDriver webDriver;49 private final WrapperUtils wrapperUtils;50 51 public NLPerfectoWebDriver(final RemoteWebDriver originalWebDriver, final NLWebDriver webDriver,52 final WrapperUtils wrapperUtils) {53 this.remoteWebDriver = originalWebDriver;54 this.webDriver = webDriver;55 this.wrapperUtils = wrapperUtils;56 }57 58 /**59 * @return60 * @see java.lang.Object#hashCode()61 */62 @Override63 public int hashCode() {64 return webDriver.hashCode();65 }66 /**67 * @param obj68 * @return69 * @see java.lang.Object#equals(java.lang.Object)70 */71 @Override72 public boolean equals(Object obj) {73 return webDriver.equals(obj);74 }75 /**76 * @param detector77 * @see org.openqa.selenium.remote.RemoteWebDriver#setFileDetector(org.openqa.selenium.remote.FileDetector)78 */79 @Override80 public void setFileDetector(FileDetector detector) {81 remoteWebDriver.setFileDetector(detector);82 }83 /**84 * @return85 * @see org.openqa.selenium.remote.RemoteWebDriver#getSessionId()86 */87 @Override88 public SessionId getSessionId() {89 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getSessionId());90 }91 /**92 * @return93 * @see org.openqa.selenium.remote.RemoteWebDriver#getErrorHandler()94 */95 @Override96 public ErrorHandler getErrorHandler() {97 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getErrorHandler());98 }99 /**100 * @param handler101 * @see org.openqa.selenium.remote.RemoteWebDriver#setErrorHandler(org.openqa.selenium.remote.ErrorHandler)102 */103 @Override104 public void setErrorHandler(ErrorHandler handler) {105 remoteWebDriver.setErrorHandler(handler);106 }107 /**108 * @return109 * @see org.openqa.selenium.remote.RemoteWebDriver#getCommandExecutor()110 */111 @Override112 public CommandExecutor getCommandExecutor() {113 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getCommandExecutor());114 }115 /**116 * @return117 * @see org.openqa.selenium.remote.RemoteWebDriver#getCapabilities()118 */119 @Override120 public Capabilities getCapabilities() {121 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getCapabilities());122 }123 /**124 * @param url125 * @see org.openqa.selenium.remote.RemoteWebDriver#get(java.lang.String)126 */127 @Override128 public void get(String url) {129 webDriver.get(url);130 }131 /**132 * @return133 * @see org.openqa.selenium.remote.RemoteWebDriver#getTitle()134 */135 @Override136 public String getTitle() {137 return webDriver.getTitle();138 }139 /**140 * @return141 * @see org.openqa.selenium.remote.RemoteWebDriver#getCurrentUrl()142 */143 @Override144 public String getCurrentUrl() {145 return webDriver.getCurrentUrl();146 }147 /**148 * @param outputType149 * @return150 * @throws WebDriverException151 * @see org.openqa.selenium.remote.RemoteWebDriver#getScreenshotAs(org.openqa.selenium.OutputType)152 */153 @Override154 public <X> X getScreenshotAs(OutputType<X> outputType) throws WebDriverException {155 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getScreenshotAs(outputType));156 }157 /**158 * @param by159 * @return160 * @see org.openqa.selenium.remote.RemoteWebDriver#findElements(org.openqa.selenium.By)161 */162 @Override163 public List<WebElement> findElements(By by) {164 return webDriver.findElements(by);165 }166 /**167 * @param by168 * @return169 * @see org.openqa.selenium.remote.RemoteWebDriver#findElement(org.openqa.selenium.By)170 */171 @Override172 public WebElement findElement(By by) {173 return webDriver.findElement(by);174 }175 /**176 * @param using177 * @return178 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementById(java.lang.String)179 */180 @Override181 public WebElement findElementById(String using) {182 return webDriver.findElement(By.id(using));183 }184 /**185 * @param using186 * @return187 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsById(java.lang.String)188 */189 @Override190 public List<WebElement> findElementsById(String using) {191 return webDriver.findElements(By.id(using));192 }193 /**194 * @param using195 * @return196 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByLinkText(java.lang.String)197 */198 @Override199 public WebElement findElementByLinkText(String using) {200 return webDriver.findElement(By.linkText(using));201 }202 /**203 * @param using204 * @return205 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByLinkText(java.lang.String)206 */207 @Override208 public List<WebElement> findElementsByLinkText(String using) {209 return webDriver.findElements(By.linkText(using));210 }211 /**212 * @param using213 * @return214 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByPartialLinkText(java.lang.String)215 */216 @Override217 public WebElement findElementByPartialLinkText(String using) {218 return webDriver.findElement(By.partialLinkText(using));219 }220 /**221 * @param using222 * @return223 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByPartialLinkText(java.lang.String)224 */225 @Override226 public List<WebElement> findElementsByPartialLinkText(String using) {227 return webDriver.findElements(By.partialLinkText(using));228 }229 /**230 * @param using231 * @return232 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByTagName(java.lang.String)233 */234 @Override235 public WebElement findElementByTagName(String using) {236 return webDriver.findElement(By.tagName(using));237 }238 /**239 * @param using240 * @return241 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByTagName(java.lang.String)242 */243 @Override244 public List<WebElement> findElementsByTagName(String using) {245 return webDriver.findElements(By.tagName(using));246 }247 /**248 * @param using249 * @return250 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByName(java.lang.String)251 */252 @Override253 public WebElement findElementByName(String using) {254 return webDriver.findElement(By.name(using));255 }256 /**257 * @param using258 * @return259 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByName(java.lang.String)260 */261 @Override262 public List<WebElement> findElementsByName(String using) {263 return webDriver.findElements(By.name(using));264 }265 /**266 * @param using267 * @return268 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByClassName(java.lang.String)269 */270 @Override271 public WebElement findElementByClassName(String using) {272 return webDriver.findElement(By.className(using));273 }274 /**275 * @param using276 * @return277 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByClassName(java.lang.String)278 */279 @Override280 public List<WebElement> findElementsByClassName(String using) {281 return webDriver.findElements(By.className(using));282 }283 /**284 * @param using285 * @return286 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByCssSelector(java.lang.String)287 */288 @Override289 public WebElement findElementByCssSelector(String using) {290 return webDriver.findElement(By.cssSelector(using));291 }292 /**293 * @param using294 * @return295 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByCssSelector(java.lang.String)296 */297 @Override298 public List<WebElement> findElementsByCssSelector(String using) {299 return webDriver.findElements(By.cssSelector(using));300 }301 /**302 * @param using303 * @return304 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementByXPath(java.lang.String)305 */306 @Override307 public WebElement findElementByXPath(String using) {308 return webDriver.findElement(By.xpath(using));309 }310 /**311 * @param using312 * @return313 * @see org.openqa.selenium.remote.RemoteWebDriver#findElementsByXPath(java.lang.String)314 */315 @Override316 public List<WebElement> findElementsByXPath(String using) {317 return webDriver.findElements(By.xpath(using));318 }319 /**320 * @return321 * @see org.openqa.selenium.remote.RemoteWebDriver#getPageSource()322 */323 @Override324 public String getPageSource() {325 return webDriver.getPageSource();326 }327 /**328 * 329 * @see org.openqa.selenium.remote.RemoteWebDriver#close()330 */331 @Override332 public void close() {333 webDriver.close();334 }335 /**336 * 337 * @see org.openqa.selenium.remote.RemoteWebDriver#quit()338 */339 @Override340 public void quit() {341 webDriver.quit();342 }343 /**344 * @return345 * @see org.openqa.selenium.remote.RemoteWebDriver#getWindowHandles()346 */347 @Override348 public Set<String> getWindowHandles() {349 return webDriver.getWindowHandles();350 }351 /**352 * @return353 * @see org.openqa.selenium.remote.RemoteWebDriver#getWindowHandle()354 */355 @Override356 public String getWindowHandle() {357 return webDriver.getWindowHandle();358 }359 /**360 * @param script361 * @param args362 * @return363 * @see org.openqa.selenium.remote.RemoteWebDriver#executeScript(java.lang.String, java.lang.Object[])364 */365 @Override366 public Object executeScript(String script, Object... args) {367 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.executeScript(script, args));368 }369 /**370 * @param script371 * @param args372 * @return373 * @see org.openqa.selenium.remote.RemoteWebDriver#executeAsyncScript(java.lang.String, java.lang.Object[])374 */375 @Override376 public Object executeAsyncScript(String script, Object... args) {377 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.executeAsyncScript(script, args));378 }379 /**380 * @return381 * @see org.openqa.selenium.remote.RemoteWebDriver#switchTo()382 */383 @Override384 public TargetLocator switchTo() {385 return webDriver.switchTo();386 }387 /**388 * @return389 * @see org.openqa.selenium.remote.RemoteWebDriver#navigate()390 */391 @Override392 public Navigation navigate() {393 return webDriver.navigate();394 }395 /**396 * @return397 * @see org.openqa.selenium.remote.RemoteWebDriver#manage()398 */399 @Override400 public Options manage() {401 return webDriver.manage();402 }403 /**404 * @param level405 * @see org.openqa.selenium.remote.RemoteWebDriver#setLogLevel(java.util.logging.Level)406 */407 @Override408 public void setLogLevel(Level level) {409 remoteWebDriver.setLogLevel(level);410 }411 /**412 * @return413 * @see org.openqa.selenium.remote.RemoteWebDriver#getKeyboard()414 */415 @Override416 public Keyboard getKeyboard() {417 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getKeyboard());418 }419 /**420 * @return421 * @see org.openqa.selenium.remote.RemoteWebDriver#getMouse()422 */423 @Override424 public Mouse getMouse() {425 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getMouse());426 }427 /**428 * @return429 * @see org.openqa.selenium.remote.RemoteWebDriver#getFileDetector()430 */431 @Override432 public FileDetector getFileDetector() {433 return wrapperUtils.wrapIfNecessary(webDriver, remoteWebDriver.getFileDetector());434 }435 /**436 * @return437 * @see org.openqa.selenium.remote.RemoteWebDriver#toString()438 */439 @Override440 public String toString() {441 return webDriver.toString();442 }443 @Override444 public void startTransaction(final String name) {445 webDriver.startTransaction(name);446 }447 @Override448 public void stopTransaction() {449 webDriver.stopTransaction();450 }451 @Override...

Full Screen

Full Screen

Source:ChromeDriver.java Github

copy

Full Screen

...28import org.openqa.selenium.interactions.TouchScreen;29import org.openqa.selenium.mobile.NetworkConnection;30import org.openqa.selenium.remote.FileDetector;31import org.openqa.selenium.remote.RemoteTouchScreen;32import org.openqa.selenium.remote.RemoteWebDriver;33import org.openqa.selenium.remote.html5.RemoteLocationContext;34import org.openqa.selenium.remote.html5.RemoteWebStorage;35import org.openqa.selenium.remote.mobile.RemoteNetworkConnection;36/**37 * A {@link WebDriver} implementation that controls a Chrome browser running on the local machine.38 * This class is provided as a convenience for easily testing the Chrome browser. The control server39 * which each instance communicates with will live and die with the instance.40 *41 * To avoid unnecessarily restarting the ChromeDriver server with each instance, use a42 * {@link RemoteWebDriver} coupled with the desired {@link ChromeDriverService}, which is managed43 * separately. For example: <pre>{@code44 *45 * import static org.junit.Assert.assertEquals;46 *47 * import org.junit.*;48 * import org.junit.runner.RunWith;49 * import org.junit.runners.JUnit4;50 * import org.openqa.selenium.chrome.ChromeDriverService;51 * import org.openqa.selenium.remote.DesiredCapabilities;52 * import org.openqa.selenium.remote.RemoteWebDriver;53 *54 * {@literal @RunWith(JUnit4.class)}55 * public class ChromeTest extends TestCase {56 *57 * private static ChromeDriverService service;58 * private WebDriver driver;59 *60 * {@literal @BeforeClass}61 * public static void createAndStartService() {62 * service = new ChromeDriverService.Builder()63 * .usingDriverExecutable(new File("path/to/my/chromedriver.exe"))64 * .usingAnyFreePort()65 * .build();66 * service.start();67 * }68 *69 * {@literal @AfterClass}70 * public static void createAndStopService() {71 * service.stop();72 * }73 *74 * {@literal @Before}75 * public void createDriver() {76 * driver = new RemoteWebDriver(service.getUrl(),77 * DesiredCapabilities.chrome());78 * }79 *80 * {@literal @After}81 * public void quitDriver() {82 * driver.quit();83 * }84 *85 * {@literal @Test}86 * public void testGoogleSearch() {87 * driver.get("http://www.google.com");88 * WebElement searchBox = driver.findElement(By.name("q"));89 * searchBox.sendKeys("webdriver");90 * searchBox.quit();91 * assertEquals("webdriver - Google Search", driver.getTitle());92 * }93 * }94 * }</pre>95 *96 * Note that unlike ChromeDriver, RemoteWebDriver doesn't directly implement97 * role interfaces such as {@link LocationContext} and {@link WebStorage}.98 * Therefore, to access that functionality, it needs to be99 * {@link org.openqa.selenium.remote.Augmenter augmented} and then cast100 * to the appropriate interface.101 *102 * @see ChromeDriverService#createDefaultService103 */104public class ChromeDriver extends RemoteWebDriver105 implements LocationContext, WebStorage, HasTouchScreen, NetworkConnection {106 private RemoteLocationContext locationContext;107 private RemoteWebStorage webStorage;108 private TouchScreen touchScreen;109 private RemoteNetworkConnection networkConnection;110 /**111 * Creates a new ChromeDriver using the {@link ChromeDriverService#createDefaultService default}112 * server configuration.113 *114 * @see #ChromeDriver(ChromeDriverService, ChromeOptions)115 */116 public ChromeDriver() {117 this(ChromeDriverService.createDefaultService(), new ChromeOptions());118 }119 /**120 * Creates a new ChromeDriver instance. The {@code service} will be started along with the driver,121 * and shutdown upon calling {@link #quit()}.122 *123 * @param service The service to use.124 * @see RemoteWebDriver#RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)125 * @deprecated Use {@link RemoteWebDriver#RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}126 */127 @Deprecated128 public ChromeDriver(ChromeDriverService service) {129 this(service, new ChromeOptions());130 }131 /**132 * Creates a new ChromeDriver instance. The {@code capabilities} will be passed to the133 * chromedriver service.134 *135 * @param capabilities The capabilities required from the ChromeDriver.136 * @see #ChromeDriver(ChromeDriverService, Capabilities)137 */138 public ChromeDriver(Capabilities capabilities) {139 this(ChromeDriverService.createDefaultService(), capabilities);140 }141 /**142 * Creates a new ChromeDriver instance with the specified options.143 *144 * @param options The options to use.145 * @see #ChromeDriver(ChromeDriverService, ChromeOptions)146 */147 public ChromeDriver(ChromeOptions options) {148 this(ChromeDriverService.createDefaultService(), options);149 }150 /**151 * Creates a new ChromeDriver instance with the specified options. The {@code service} will be152 * started along with the driver, and shutdown upon calling {@link #quit()}.153 *154 * @param service The service to use.155 * @param options The options to use.156 * @deprecated Use {@link RemoteWebDriver#RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}157 */158 @Deprecated159 public ChromeDriver(ChromeDriverService service, ChromeOptions options) {160 this(service, options.toCapabilities());161 }162 /**163 * Creates a new ChromeDriver instance. The {@code service} will be started along with the164 * driver, and shutdown upon calling {@link #quit()}.165 *166 * @param service The service to use.167 * @param capabilities The capabilities required from the ChromeDriver.168 * @deprecated Use {@link RemoteWebDriver#RemoteWebDriver(org.openqa.selenium.remote.CommandExecutor, Capabilities)}169 */170 @Deprecated171 public ChromeDriver(ChromeDriverService service, Capabilities capabilities) {172 super(new ChromeDriverCommandExecutor(service), capabilities);173 locationContext = new RemoteLocationContext(getExecuteMethod());174 webStorage = new RemoteWebStorage(getExecuteMethod());175 touchScreen = new RemoteTouchScreen(getExecuteMethod());176 networkConnection = new RemoteNetworkConnection(getExecuteMethod());177 }178 @Override179 public void setFileDetector(FileDetector detector) {180 throw new WebDriverException(181 "Setting the file detector only works on remote webdriver instances obtained " +182 "via RemoteWebDriver");183 }184 @Override185 public LocalStorage getLocalStorage() {186 return webStorage.getLocalStorage();187 }188 @Override189 public SessionStorage getSessionStorage() {190 return webStorage.getSessionStorage();191 }192 @Override193 public Location location() {194 return locationContext.location();195 }196 @Override...

Full Screen

Full Screen

Source:BaseAugmenter.java Github

copy

Full Screen

...31import java.util.HashMap;32import java.util.Map;33/**34 * Enhance the interfaces implemented by an instance of the35 * {@link org.openqa.selenium.remote.RemoteWebDriver} based on the returned36 * {@link org.openqa.selenium.Capabilities} of the driver.37 *38 * Note: this class is still experimental. Use at your own risk.39 */40public abstract class BaseAugmenter {41 private final Map<String, AugmenterProvider> driverAugmentors = new HashMap<>();42 private final Map<String, AugmenterProvider> elementAugmentors = new HashMap<>();43 public BaseAugmenter() {44 addDriverAugmentation(SUPPORTS_FINDING_BY_CSS, new AddFindsByCss());45 addDriverAugmentation(SUPPORTS_LOCATION_CONTEXT, new AddLocationContext());46 addDriverAugmentation(SUPPORTS_APPLICATION_CACHE, new AddApplicationCache());47 addDriverAugmentation(SUPPORTS_NETWORK_CONNECTION, new AddNetworkConnection());48 addDriverAugmentation(SUPPORTS_WEB_STORAGE, new AddWebStorage());49 addDriverAugmentation(ROTATABLE, new AddRotatable());50 addDriverAugmentation(HAS_TOUCHSCREEN, new AddRemoteTouchScreen());51 addElementAugmentation(SUPPORTS_FINDING_BY_CSS, new AddFindsChildByCss());52 }53 /**54 * Add a mapping between a capability name and the implementation of the interface that name55 * represents for instances of {@link org.openqa.selenium.WebDriver}. For example (@link56 * CapabilityType#SUPPORTS_FINDING_BY_CSS} represents the interface57 * {@link org.openqa.selenium.internal.FindsByCssSelector}, which is implemented via the58 * {@link org.openqa.selenium.remote.AddFindsByCss} provider.59 *60 * Note: This method is still experimental. Use at your own risk.61 *62 * @param capabilityName The name of the capability to model63 * @param handlerClass The provider of the interface and implementation64 */65 public void addDriverAugmentation(String capabilityName, AugmenterProvider handlerClass) {66 driverAugmentors.put(capabilityName, handlerClass);67 }68 /**69 * Add a mapping between a capability name and the implementation of the interface that name70 * represents for instances of {@link org.openqa.selenium.WebElement}. For example (@link71 * CapabilityType#SUPPORTS_FINDING_BY_CSS} represents the interface72 * {@link org.openqa.selenium.internal.FindsByCssSelector}, which is implemented via the73 * {@link AddFindsByCss} provider.74 *75 * Note: This method is still experimental. Use at your own risk.76 *77 * @param capabilityName The name of the capability to model78 * @param handlerClass The provider of the interface and implementation79 */80 public void addElementAugmentation(String capabilityName, AugmenterProvider handlerClass) {81 elementAugmentors.put(capabilityName, handlerClass);82 }83 /**84 * Enhance the interfaces implemented by this instance of WebDriver iff that instance is a85 * {@link org.openqa.selenium.remote.RemoteWebDriver}.86 *87 * The WebDriver that is returned may well be a dynamic proxy. You cannot rely on the concrete88 * implementing class to remain constant.89 *90 * @param driver The driver to enhance91 * @return A class implementing the described interfaces.92 */93 public WebDriver augment(WebDriver driver) {94 RemoteWebDriver remoteDriver = extractRemoteWebDriver(driver);95 if (remoteDriver == null) {96 return driver;97 }98 return create(remoteDriver, driverAugmentors, driver);99 }100 /**101 * Enhance the interfaces implemented by this instance of WebElement iff that instance is a102 * {@link org.openqa.selenium.remote.RemoteWebElement}.103 *104 * The WebElement that is returned may well be a dynamic proxy. You cannot rely on the concrete105 * implementing class to remain constant.106 *107 * @param element The driver to enhance.108 * @return A class implementing the described interfaces.109 */110 public WebElement augment(RemoteWebElement element) {111 // TODO(simon): We should really add a "SelfDescribing" interface for this112 RemoteWebDriver parent = (RemoteWebDriver) element.getWrappedDriver();113 if (parent == null) {114 return element;115 }116 return create(parent, elementAugmentors, element);117 }118 /**119 * Subclasses should perform the requested augmentation.120 *121 * @param <X> typically a RemoteWebDriver or RemoteWebElement122 * @param augmentors augumentors to augment the object123 * @param driver RWD instance124 * @param objectToAugment object to augment125 * @return an augmented version of objectToAugment.126 */127 protected abstract <X> X create(RemoteWebDriver driver, Map<String, AugmenterProvider> augmentors,128 X objectToAugment);129 /**130 * Subclasses should extract the remote webdriver or return null if it can't extract it.131 *132 * @param driver WebDriver instance to extract133 * @return extracted RemoteWebDriver or null134 */135 protected abstract RemoteWebDriver extractRemoteWebDriver(WebDriver driver);136}...

Full Screen

Full Screen

Source:WebDriverAdditionalTestDocsAdapter.java Github

copy

Full Screen

...19 methodAdd("org.openqa.selenium.By", "name", CaptureStyle.NONE);20 methodAdd("org.openqa.selenium.By", "partialLinkText", CaptureStyle.NONE);21 methodAdd("org.openqa.selenium.By", "tagName", CaptureStyle.NONE);22 methodAdd("org.openqa.selenium.By", "xpath", CaptureStyle.NONE);23 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByClassName");24 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByCssSelector");25 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementById");26 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByLinkText");27 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByName");28 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByPartialLinkText");29 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByTagName");30 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementByXPath");31 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByClassName");32 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByCssSelector");33 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsById");34 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByLinkText");35 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByName");36 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByPartialLinkText");37 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByTagName");38 methodAdd("org.openqa.selenium.remote.RemoteWebDriver", "findElementsByXPath");39 methodAdd("org.openqa.selenium.Rotatable", "getOrientation");40 methodAdd("org.openqa.selenium.Rotatable", "rotate");41 methodAdd("org.openqa.selenium.support.ui.Select", "Select");42 methodAdd("org.openqa.selenium.support.ui.Select", "selectByIndex");43 methodAdd("org.openqa.selenium.support.ui.Select", "selectByValue");44 methodAdd("org.openqa.selenium.support.ui.Select", "selectByVisibleText");45 methodAdd("org.openqa.selenium.WebDriver", "close");46 methodAdd("org.openqa.selenium.WebDriver", "findElement");47 methodAdd("org.openqa.selenium.WebDriver", "findElements");48 methodAdd("org.openqa.selenium.WebDriver", "get");49 methodAdd("org.openqa.selenium.WebDriver", "getCurrentUrl");50 methodAdd("org.openqa.selenium.WebDriver", "getTitle");51 methodAdd("org.openqa.selenium.WebDriver", "quit");52 methodAdd("org.openqa.selenium.WebDriver$Navigation", "back");...

Full Screen

Full Screen

Source:TestRDW.java Github

copy

Full Screen

...15import org.openqa.selenium.remote.Command;16import org.openqa.selenium.remote.CommandExecutor;17import org.openqa.selenium.remote.DesiredCapabilities;18import org.openqa.selenium.remote.HttpCommandExecutor;19import org.openqa.selenium.remote.RemoteWebDriver;20import org.openqa.selenium.remote.Response;21import org.openqa.selenium.remote.SessionId;22import org.openqa.selenium.remote.http.W3CHttpCommandCodec;23import org.openqa.selenium.remote.http.W3CHttpResponseCodec;24import org.testng.annotations.Test;2526public class TestRDW {27 public static RemoteWebDriver createDriverFromSession(final SessionId sessionId, URL command_executor) {28 CommandExecutor executor = new HttpCommandExecutor(command_executor) {29 @Override30 public Response execute(Command command) throws IOException {31 Response response = null;32 if (command.getName() == "newSession") {33 response = new Response();34 response.setSessionId(sessionId.toString());35 response.setStatus(0);36 response.setValue(Collections.<String, String>emptyMap());37 try {38 Field commandCodec = null;39 commandCodec = this.getClass().getSuperclass().getDeclaredField("commandCodec");40 commandCodec.setAccessible(true);41 commandCodec.set(this, new W3CHttpCommandCodec());42 Field responseCodec = null;43 responseCodec = this.getClass().getSuperclass().getDeclaredField("responseCodec");44 responseCodec.setAccessible(true);45 responseCodec.set(this, new W3CHttpResponseCodec()); // JsonHttpCommandCodec --> firefox and46 // W3CHttpResponseCodec ---> chrome47 } catch (NoSuchFieldException e) {48 e.printStackTrace();49 } catch (IllegalAccessException e) {50 e.printStackTrace();51 }52 } else {53 response = super.execute(command);54 }55 return response;56 }57 };58 return new RemoteWebDriver(executor, new DesiredCapabilities());59 }60 61 public void selectRadioButton(List<WebElement> oElement, String option) {62 int radioCount = oElement.size();63 for (int i = 0; i < radioCount; i++) {64 String radioValue = oElement.get(i).getAttribute("value");65 if (radioValue.equalsIgnoreCase(option)) { 66 oElement.get(i).click(); 67 break;68 }69 }70 }7172 @Test73 public void Test1() throws MalformedURLException, AWTException {// throws MalformedURLException, AWTException74 WebDriver driver;75// System.setProperty("webdriver.chrome.driver",76// "C:\\Users\\Suresh Mylam\\eclipse-workspace\\Testing\\src\\main\\resources\\exe\\chromedriver.exe");77// WebDriver driver = new ChromeDriver();7879 System.setProperty("webdriver.gecko.driver", "C:\\Users\\Suresh Mylam\\git\\qa_autotest_judi\\src\\main\\resources\\drivers\\exe\\geckodriver.exe");80 driver = new FirefoxDriver();8182 HttpCommandExecutor executor = (HttpCommandExecutor) ((RemoteWebDriver) driver).getCommandExecutor();83 URL url = executor.getAddressOfRemoteServer();84 System.out.println(url);85 SessionId session_id = ((RemoteWebDriver) driver).getSessionId();86 System.out.println(session_id);87 System.out.println("Done");88 89// http://localhost:1641290// 069d3981-e39f-421e-994f-70edff7b083491 9293// DesiredCapabilities capabilities = DesiredCapabilities.firefox();94//// RemoteWebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:7055/hub"), "41ad3bed-53af-4fdf-a2d1-f3f428e7d071", capabilities);95 96 URL url3 = new URL("http://localhost:16412");97 SessionId session_id3 = new SessionId("069d3981-e39f-421e-994f-70edff7b0834");98 RemoteWebDriver driver2 = createDriverFromSession(session_id3, url3);99100101102103 }104 ...

Full Screen

Full Screen

Source:Selenium2Test.java Github

copy

Full Screen

...6import org.openqa.selenium.remote.Command;7import org.openqa.selenium.remote.CommandExecutor;8import org.openqa.selenium.remote.DesiredCapabilities;9import org.openqa.selenium.remote.HttpCommandExecutor;10import org.openqa.selenium.remote.RemoteWebDriver;11import org.openqa.selenium.remote.Response;12import org.openqa.selenium.remote.SessionId;13import org.openqa.selenium.remote.http.W3CHttpCommandCodec;14import org.openqa.selenium.remote.http.W3CHttpResponseCodec;15import java.io.IOException;16import java.lang.reflect.Field;17import java.net.URL;18import java.util.Collections;19public class Selenium2Test{20 public static RemoteWebDriver createDriverFromSession(final SessionId sessionId, URL command_executor){21 CommandExecutor executor = new HttpCommandExecutor(command_executor) {22 @Override23 public Response execute(Command command) throws IOException{24 Response response = null;25 if (command.getName() == "newSession") {26 response = new Response();27 response.setSessionId(sessionId.toString());28 response.setStatus(0);29 response.setValue(Collections.<String, String>emptyMap());30 try {31 Field commandCodec = null;32 commandCodec = this.getClass().getSuperclass().getDeclaredField("commandCodec");33 commandCodec.setAccessible(true);34 commandCodec.set(this, new W3CHttpCommandCodec());35 Field responseCodec = null;36 responseCodec = this.getClass().getSuperclass().getDeclaredField("responseCodec");37 responseCodec.setAccessible(true);38 responseCodec.set(this, new W3CHttpResponseCodec());39 } catch (NoSuchFieldException e) {40 e.printStackTrace();41 } catch (IllegalAccessException e) {42 e.printStackTrace();43 }44 } else {45 response = super.execute(command);46 }47 return response;48 }49 };50 return new RemoteWebDriver(executor, new DesiredCapabilities());51 }52 public static void main(String [] args) {53 System.setProperty("webdriver.gecko.driver","/Users/amin/Documents/geckodriver/geckodriver");54 FirefoxOptions opts = new FirefoxOptions();55 opts.setCapability( "moz:webdriverClick", false );56 WebDriver driver = new FirefoxDriver( opts );57 //System.setProperty("webdriver.chrome.driver","/Applications/Google Chrome.app/Contents/MacOS/Google Chrome");58 //ChromeDriver driver = new ChromeDriver();59 System.out.println("test");60 HttpCommandExecutor executor = (HttpCommandExecutor) ((FirefoxDriver)driver).getCommandExecutor();;61 URL url = executor.getAddressOfRemoteServer();62 SessionId session_id = ((FirefoxDriver)driver).getSessionId();63 RemoteWebDriver driver2 = createDriverFromSession(session_id, url);64 driver2.get("http://www.google.de");65 }66}...

Full Screen

Full Screen

Source:W3CActions.java Github

copy

Full Screen

2import java.util.Map;3import org.openqa.selenium.remote.Command;4import org.openqa.selenium.remote.CommandExecutor;5import org.openqa.selenium.remote.ErrorHandler;6import org.openqa.selenium.remote.RemoteWebDriver;7import org.openqa.selenium.remote.Response;8import org.openqa.selenium.remote.server.JsonParametersAware;9import org.openqa.selenium.remote.server.Session;10public class W3CActions11 extends WebDriverHandler<Void>12 implements JsonParametersAware13{14 private Map<String, Object> allParameters;15 16 public W3CActions(Session session)17 {18 super(session);19 }20 21 public void setJsonParameters(Map<String, Object> allParameters) throws Exception22 {23 this.allParameters = allParameters;24 }25 26 public Void call() throws Exception27 {28 RemoteWebDriver driver = (RemoteWebDriver)getUnwrappedDriver();29 CommandExecutor executor = driver.getCommandExecutor();30 31 long start = System.currentTimeMillis();32 Command command = new Command(driver.getSessionId(), "actions", allParameters);33 Response response = executor.execute(command);34 35 new ErrorHandler(true)36 .throwIfResponseFailed(response, System.currentTimeMillis() - start);37 38 return null;39 }40}...

Full Screen

Full Screen

RemoteWebDriver

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.remote.RemoteWebDriver;2import org.openqa.selenium.remote.DesiredCapabilities;3import org.openqa.selenium.firefox.FirefoxDriver;4import org.openqa.selenium.firefox.FirefoxProfile;5import org.openqa.selenium.remote.BrowserType;6public class RemoteWebDriverExample {7 public static void main(String[] args) {8 FirefoxProfile profile = new FirefoxProfile();9 profile.setAcceptUntrustedCertificates(true);10 profile.setPreference("network.automatic-ntlm-auth.allow-non-fqdn", true);11 DesiredCapabilities capabilities = DesiredCapabilities.firefox();12 capabilities.setCapability(FirefoxDriver.PROFILE, profile);13 capabilities.setCapability("network.automatic-ntlm-auth.allow-non-fqdn", true);14 RemoteWebDriver driver = new RemoteWebDriver(capabilities);15 driver.quit();16 }17}18package com.javatpoint;19import org.openqa.selenium.remote.RemoteWebDriver;20import org.openqa.selenium.remote.DesiredCapabilities;21import org.openqa.selenium.firefox.FirefoxDriver;22import org.openqa.selenium.firefox.FirefoxProfile;23import org.openqa.selenium.remote.BrowserType;24public class RemoteWebDriverExample {25 public static void main(String[] args) {

Full Screen

Full Screen

RemoteWebDriver

Using AI Code Generation

copy

Full Screen

1import java.net.URL;2import org.openqa.selenium.By;3import org.openqa.selenium.remote.RemoteWebDriver;4import org.openqa.selenium.remote.DesiredCapabilities;5public class RemoteWebDriverTest {6 public static void main(String[] args) throws Exception {

Full Screen

Full Screen

RemoteWebDriver

Using AI Code Generation

copy

Full Screen

1import org.openqa.selenium.WebDriver;2import org.openqa.selenium.chrome.ChromeDriver;3import org.openqa.selenium.firefox.FirefoxDriver;4import org.openqa.selenium.ie.InternetExplorerDriver;5public class Selenium3Test {6public static void main(String[] args) {7 WebDriver driver = new ChromeDriver();8 driver.manage().window().maximize();9 System.out.println(driver.getTitle());10 driver.close();11 driver.quit();12}13}

Full Screen

Full Screen
copy
1public class Test {23 public class A {}45 public class B extends A {}67 public class C extends B {}89 public void testCoVariance(List<? extends B> myBlist) {10 B b = new B();11 C c = new C();12 myBlist.add(b); // does not compile13 myBlist.add(c); // does not compile14 A a = myBlist.get(0); 15 }1617 public void testContraVariance(List<? super B> myBlist) {18 B b = new B();19 C c = new C();20 myBlist.add(b);21 myBlist.add(c);22 A a = myBlist.get(0); // does not compile23 }24}25
Full Screen

Selenium 4 Tutorial:

LambdaTest’s Selenium 4 tutorial is covering every aspects of Selenium 4 testing with examples and best practices. Here you will learn basics, such as how to upgrade from Selenium 3 to Selenium 4, to some advanced concepts, such as Relative locators and Selenium Grid 4 for Distributed testing. Also will learn new features of Selenium 4, such as capturing screenshots of specific elements, opening a new tab or window on the browser, and new protocol adoptions.

Chapters:

  1. Upgrading From Selenium 3 To Selenium 4?: In this chapter, learn in detail how to update Selenium 3 to Selenium 4 for Java binding. Also, learn how to upgrade while using different build tools such as Maven or Gradle and get comprehensive guidance for upgrading Selenium.

  2. What’s New In Selenium 4 & What’s Being Deprecated? : Get all information about new implementations in Selenium 4, such as W3S protocol adaption, Optimized Selenium Grid, and Enhanced Selenium IDE. Also, learn what is deprecated for Selenium 4, such as DesiredCapabilites and FindsBy methods, etc.

  3. Selenium 4 With Python: Selenium supports all major languages, such as Python, C#, Ruby, and JavaScript. In this chapter, learn how to install Selenium 4 for Python and the features of Python in Selenium 4, such as Relative locators, Browser manipulation, and Chrom DevTool protocol.

  4. Selenium 4 Is Now W3C Compliant: JSON Wireframe protocol is retiring from Selenium 4, and they are adopting W3C protocol to learn in detail about the advantages and impact of these changes.

  5. How To Use Selenium 4 Relative Locator? : Selenium 4 came with new features such as Relative Locators that allow constructing locators with reference and easily located constructors nearby. Get to know its different use cases with examples.

  6. Selenium Grid 4 Tutorial For Distributed Testing: Selenium Grid 4 allows you to perform tests over different browsers, OS, and device combinations. It also enables parallel execution browser testing, reads up on various features of Selenium Grid 4 and how to download it, and runs a test on Selenium Grid 4 with best practices.

  7. Selenium Video Tutorials: Binge on video tutorials on Selenium by industry experts to get step-by-step direction from automating basic to complex test scenarios with Selenium.

Selenium 101 certifications:

LambdaTest also provides certification for Selenium testing to accelerate your career in Selenium automation testing.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful