Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriverException


    String base = "/instruments_no_delay/" + pathForVersion(version) + "/";
    InputStream is = InstrumentsNoDelayLoader.class.getResourceAsStream(base + resource);

    if (is == null) {
      String msg = "Cannot find " + base + resource + ".";
      throw new WebDriverException(msg);
    }
    File f = null;
    try {
      f = new File(workingDirectory, resource);
      FileOutputStream os = new FileOutputStream(f);
View Full Code Here


    super(driver, request);
  }

  @Override
  public Response handle() throws Exception {
    throw new WebDriverException(
        "not implemented" + getRequest().getMethod() + " " + getRequest().getPath());
  }
View Full Code Here

    try {
      NSObject object = PropertyListParser.parse(plist);
      ApplicationInfo info = new ApplicationInfo(object);
      return info.getProperties();
    } catch (Exception ex) {
      throw new WebDriverException(
          String.format("In %s: Cannot parse %s: %s", source, plist.getAbsolutePath(), ex.getMessage()),
          ex);
    }
  }
View Full Code Here

  public static boolean SIMULATORS_ENABLED = false;
  public static boolean BETA_FEATURE = false;

  public static void off() {
    throw new WebDriverException("You need to enable beta feature.");
  }
View Full Code Here

      languages = null;
      return;
    }
    this.app = new File(pathToApp);
    if (!app.exists()) {
      throw new WebDriverException(pathToApp + "isn't an IOS app.");
    }
    dictionaries = loadDictionaries();
    languages = loadLanguages();
    try {
      metadata = getFullPlist();
    } catch (Exception e) {
      throw new WebDriverException(
          "cannot load the metadata from the Info.plist file for " + pathToApp);
    }
  }
View Full Code Here

    for (AppleLanguage loc : getSupportedLanguages()) {
      if (languageCode.equals(loc.getIsoCode())) {
        return loc;
      }
    }
    throw new WebDriverException("Cannot find AppleLocale for " + languageCode);
  }
View Full Code Here

    return getDictionary(AppleLanguage.valueOf(languageCode));
  }

  public LanguageDictionary getDictionary(AppleLanguage language) throws WebDriverException {
    if (!language.exists()) {
      throw new WebDriverException("The application doesn't have any content files.The l10n "
                                   + "features cannot be used.");
    }
    for (LanguageDictionary dict : dictionaries) {
      if (dict.getLanguage() == language) {
        return dict;
      }
    }
    throw new WebDriverException("Cannot find dictionary for " + language);
  }
View Full Code Here

        return iconFiles.get(0).toString();
      } else {
        return "";
      }
    } catch (JSONException e) {
      throw new WebDriverException("property 'CFBundleIcons' can't be returned. " + e.getMessage(), e);
    }
  }
View Full Code Here

      // " for this app.");
    }
    try {
      return metadata.getString(key);
    } catch (JSONException e) {
      throw new WebDriverException("property " + key + " can't be returned. " + e.getMessage(), e);
    }
  }
View Full Code Here

      for (int i = 0; i < array.length(); i++) {
        res.add(array.getInt(i));
      }
      return res;
    } catch (JSONException e) {
      throw new WebDriverException("Cannot load device family", e);
    }
  }
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.