Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriverException


    this.productType = info.getProductType();
    this.iosVersion = info.getProductVersion();
    try {
      installer = new InstallerService(info.getDevice());
    } catch (SDKException e) {
      throw new WebDriverException(e);
    }
  }
View Full Code Here


  public List<ApplicationInfo> getApplications() {
    try {
      return installer.listApplications(InstallerService.ApplicationType.USER);
    } catch (SDKException e) {
      throw new WebDriverException(e);
    }
  }
View Full Code Here

      byte[] img64 = Base64.decodeBase64(encoded64);
      FileOutputStream os = new FileOutputStream(f);
      os.write(img64);
      os.close();
    } catch (Exception e) {
      throw new WebDriverException("cannot extract screenshot" + e.getMessage());
    }
  }
View Full Code Here

        } catch (IOException ignore) {
          log.fine("url: " + app + ": " + ignore);
        }
      }
      if (appFile == null || !appFile.exists()) {
        throw new WebDriverException(app + " isn't an IOS app.");
      }
      driver.addSupportedApplication(APPIOSApplication.createFrom(appFile));
    }

    p(String.format("version:%s", BuildInfo.getAttribute("sha")));
View Full Code Here

        Class c = Class.forName(clazz);
        String path = "/extra/" + c.getSimpleName() + "/*";
        extra.addServlet(c, "/extra/" + c.getSimpleName() + "/*");
        log.info("Servlet " + c + " visible @ " + path);
      } catch (ClassNotFoundException e) {
        throw new WebDriverException(
            "cannot plug servlet " + clazz + ". Cause : " + e.getMessage());
      }
    }
    extra.setAttribute(DRIVER, driver);

View Full Code Here

    // check if the session is in the process of stopping
    for (ServerSideSession session : sessions) {
      if (session.getSessionId().equals(opaqueKey)) {
        if (session.getSessionState() == ServerSideSession.SessionState.stopped) {
          throw new WebDriverException(session.getStopCause().name());
        } else {
          return session;
        }
      }
    }

    // if the session isn't there anymore, try to give a helpful message on why it stopped
    ServerSideSession.StopCause cause = reasonByOpaqueKey.get(opaqueKey);
    if (cause != null) {
      throw new WebDriverException(cause.name());
    }
    throw new WebDriverException("Cannot find session " + opaqueKey + " on the server.");

  }
View Full Code Here

    try {
      Event e = createObject(message);
      return e;
    } catch (Exception e) {
      log.log(Level.WARNING, "TODO", e);
      throw new WebDriverException("Error creating an event generated by the webview:" + message,
                                   e);
    }
  }
View Full Code Here

          .put("title", WIRTitleKey)
          .put("url", WIRURLKey)
          .put("id", WIRPageIdentifierKey)
          .put("connection", WIRConnectionIdentifierKey);
    } catch (JSONException e) {
      throw new WebDriverException(e);
    }
    return json;
  }
View Full Code Here

    JSONObject res = new JSONObject();
    try {
      res.put("x", x);
      res.put("y", y);
    } catch (JSONException e) {
      throw new WebDriverException(e);
    }
    return res;
  }
View Full Code Here

    return res;
  }

  @Override
  public void addDecorator(CriteriaDecorator decorator) {
    throw new WebDriverException("NI");

  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.WebDriverException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.