コード例 #1
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void flick(Coordinates where, int xOffset, int yOffset, int speed) {
   Map<String, Object> flickParams = CoordinatesUtils.paramsFromCoordinates(where);
   flickParams.put("xoffset", xOffset);
   flickParams.put("yoffset", yOffset);
   flickParams.put("speed", speed);
   executeMethod.execute(DriverCommand.TOUCH_FLICK, flickParams);
 }
コード例 #2
0
 @Override
 public double getVolume() {
   return ((Number)
           driverExecuteMethod.execute(
               QtWebKitDriverCommand.GET_PLAYER_VOLUME, ImmutableMap.of("id", id)))
       .doubleValue();
 }
コード例 #3
0
 @Override
 public double getCurrentPlayingPosition() {
   return ((Number)
           driverExecuteMethod.execute(
               QtWebKitDriverCommand.GET_CURRENT_PLAYING_POSITION, ImmutableMap.of("id", id)))
       .doubleValue();
 }
コード例 #4
0
 @Override
 public double getSpeed() {
   return ((Number)
           driverExecuteMethod.execute(
               QtWebKitDriverCommand.GET_PLAYBACK_SPEED, ImmutableMap.of("id", id)))
       .doubleValue();
 }
コード例 #5
0
 @Override
 public void setVolume(double volume) throws IllegalArgumentException {
   if (volume > 1 || volume < 0) {
     throw new IllegalArgumentException("Volume should be between 1 and 0");
   }
   driverExecuteMethod.execute(
       QtWebKitDriverCommand.SET_PLAYER_VOLUME, ImmutableMap.of("id", id, "volume", volume));
 }
コード例 #6
0
 @Override
 public PlayerState getState() {
   Number response =
       (Number)
           driverExecuteMethod.execute(
               QtWebKitDriverCommand.GET_PLAYER_STATE, ImmutableMap.of("id", id));
   PlayerState state = PlayerState.values()[response.intValue()];
   return state;
 }
コード例 #7
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void scroll(int xOffset, int yOffset) {
   Map<String, Object> scrollParams = new HashMap<String, Object>();
   scrollParams.put("xoffset", xOffset);
   scrollParams.put("yoffset", yOffset);
   executeMethod.execute(DriverCommand.TOUCH_SCROLL, scrollParams);
 }
コード例 #8
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void longPress(Coordinates where) {
   Map<String, Object> longPressParams = CoordinatesUtils.paramsFromCoordinates(where);
   executeMethod.execute(DriverCommand.TOUCH_LONG_PRESS, longPressParams);
 }
コード例 #9
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void doubleTap(Coordinates where) {
   Map<String, Object> doubleTapParams = CoordinatesUtils.paramsFromCoordinates(where);
   executeMethod.execute(DriverCommand.TOUCH_DOUBLE_TAP, doubleTapParams);
 }
コード例 #10
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void scroll(Coordinates where, int xOffset, int yOffset) {
   Map<String, Object> scrollParams = CoordinatesUtils.paramsFromCoordinates(where);
   scrollParams.put("xoffset", xOffset);
   scrollParams.put("yoffset", yOffset);
   executeMethod.execute(DriverCommand.TOUCH_SCROLL, scrollParams);
 }
コード例 #11
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void move(int x, int y) {
   Map<String, Object> moveParams = new HashMap<String, Object>();
   moveParams.put("x", x);
   moveParams.put("y", y);
   executeMethod.execute(DriverCommand.TOUCH_MOVE, moveParams);
 }
コード例 #12
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void up(int x, int y) {
   Map<String, Object> upParams = new HashMap<String, Object>();
   upParams.put("x", x);
   upParams.put("y", y);
   executeMethod.execute(DriverCommand.TOUCH_UP, upParams);
 }
コード例 #13
0
 @Override
 public void setMute(boolean mute) {
   driverExecuteMethod.execute(
       QtWebKitDriverCommand.SET_PLAYER_MUTE, ImmutableMap.of("id", id, "mute", mute));
 }
コード例 #14
0
 @Override
 public void seek(double position) {
   driverExecuteMethod.execute(
       QtWebKitDriverCommand.SET_CURRENT_PLAYING_POSITION,
       ImmutableMap.of("id", id, "position", position));
 }
コード例 #15
0
 @Override
 public void setSpeed(double speed) {
   driverExecuteMethod.execute(
       QtWebKitDriverCommand.SET_PLAYBACK_SPEED, ImmutableMap.of("id", id, "speed", speed));
 }
コード例 #16
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void flick(int xSpeed, int ySpeed) {
   Map<String, Object> flickParams = new HashMap<String, Object>();
   flickParams.put("xspeed", xSpeed);
   flickParams.put("yspeed", ySpeed);
   executeMethod.execute(DriverCommand.TOUCH_FLICK, flickParams);
 }
コード例 #17
0
ファイル: RemoteTouchScreen.java プロジェクト: Zekom/selenium
 public void down(int x, int y) {
   Map<String, Object> downParams = new HashMap<String, Object>();
   downParams.put("x", x);
   downParams.put("y", y);
   executeMethod.execute(DriverCommand.TOUCH_DOWN, downParams);
 }
コード例 #18
0
 @Override
 public void setState(PlayerState state) {
   driverExecuteMethod.execute(
       QtWebKitDriverCommand.SET_PLAYER_STATE,
       ImmutableMap.of("id", id, "state", state.ordinal()));
 }
コード例 #19
0
 @Override
 public boolean isMuted() {
   return (Boolean)
       driverExecuteMethod.execute(
           QtWebKitDriverCommand.GET_PLAYER_MUTE, ImmutableMap.of("id", id));
 }