Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriverException


      dir = new File(".").getAbsoluteFile();
      dir = new File(dir, "src/test/resources/copyFromSeleniumProject");
      needle = new File(dir, path);
    }
    if (!needle.exists()) {
      throw new WebDriverException("Cannot load " + needle);
    }
    return needle;
  }
View Full Code Here


    List<DeviceType> devices = new ArrayList<>();
    for (int i = 0; i < o.length(); i++) {
      try {
        devices.add(DeviceType.getFromFamilyCode(o.getInt(i)));
      } catch (JSONException e) {
        throw new WebDriverException(o.toString() + " but should contain only 1 or 2.");
      }
    }
    return devices;
  }
View Full Code Here

      String path = pathsIter.next();
      String base64Content;
      try {
        base64Content = o.getString(path);
      } catch (JSONException e) {
        throw new WebDriverException(o.toString() + " should only contain base64 encoded strings for values.");
      }
      files.put(path, DatatypeConverter.parseBase64Binary(base64Content));
    }

    return files;
View Full Code Here

      for (int i = 0; i < a.length(); i++) {
        try {
          res.add(a.getString(i));
        } catch (JSONException e) {
          throw new WebDriverException(e);
        }
      }
      return res;
    }
    throw new ClassCastException("Expected collection of string, got " + o.getClass());
View Full Code Here

  public URL getAppURL() {
    String app = (String) getCapability("app");
    try {
      return app == null ? null : new URL(app);
    } catch (MalformedURLException e) {
      throw new WebDriverException(
          "The 'app' key is supposed to point to a URL. " + app + " is not a URL.");
    }
  }
View Full Code Here

          Point to = (Point) args[1];
          int duration = (Integer) args[2];
          RemoteIOSDriver.pinchOpenFromToForDuration(executor, from, to, duration);
          return null;
        } else {
          throw new WebDriverException(method.getName() + " isn't recognized for IOSTouchScreen");
        }
      }
    };
  }
View Full Code Here

        break;
      case RIGHT:
        createScrollRequest("right");
        break;
      default:
        throw new WebDriverException("Scrolling direction : " + scrollDirection + " not recognised");

    }

  }
View Full Code Here

      IOUtils.copy(is, writer, "UTF-8");

      str = writer.toString();
      return new JSONObject(str);
    } catch (Exception e) {
      throw new WebDriverException(str, e);
    }
  }
View Full Code Here

      IOUtils.copy(is, writer, "UTF-8");

      str = writer.toString();
      return str;
    } catch (Exception e) {
      throw new WebDriverException(str, e);
    }
  }
View Full Code Here

    String s = extractString(resp);
    try {
      Response response = new JsonToBeanConverter().convert(Response.class, s);
      return response;
    } catch (ClassCastException cce) {
      throw new WebDriverException("not a valid response " + s);
    }

  }
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.