Interface BaseComputer
public interface BaseComputer
为计算机环境定义了一个接口。
该接口定义了用于控制计算机环境(包括网页浏览器及其他交互式系统)的标准方法。
-
方法概述
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.Single<ComputerState> clickAt(int x, int y) 在网页上点击指定的 x、y 坐标。io.reactivex.rxjava3.core.Completableclose()清理资源。io.reactivex.rxjava3.core.Single<ComputerState> 返回当前状态。io.reactivex.rxjava3.core.Single<ComputerState> dragAndDrop(int x, int y, int destinationX, int destinationY) 支持拖放操作。io.reactivex.rxjava3.core.Single<ComputerEnvironment> 返回当前的环境信息。io.reactivex.rxjava3.core.Single<ComputerState> goBack()返回上一个页面。io.reactivex.rxjava3.core.Single<ComputerState> 向前导航。io.reactivex.rxjava3.core.Single<ComputerState> hoverAt(int x, int y) 在网页上的某个特定 x、y 坐标处悬停。io.reactivex.rxjava3.core.Completable启动计算机。io.reactivex.rxjava3.core.Single<ComputerState> keyCombination(List<String> keys) 按下某个按键组合。io.reactivex.rxjava3.core.Single<ComputerState> 导航到指定的 URL。io.reactivex.rxjava3.core.Single<ComputerState> 打开网页浏览器。io.reactivex.rxjava3.core.Single<int[]> 返回当前环境的屏幕尺寸。io.reactivex.rxjava3.core.Single<ComputerState> 在指定的 x、y 坐标处,按照指定的幅度进行滚动。io.reactivex.rxjava3.core.Single<ComputerState> scrollDocument(String direction) 将整个网页朝某个方向滚动。io.reactivex.rxjava3.core.Single<ComputerState> search()直接跳转到搜索页面。io.reactivex.rxjava3.core.Single<ComputerState> typeTextAt(int x, int y, String text, Boolean pressEnter, Boolean clearBeforeTyping) 在指定的 x、y 坐标处显示文本。io.reactivex.rxjava3.core.Single<ComputerState> 等待指定的时间长度。
-
方法详细信息(Method Details)
-
screenSize
io.reactivex.rxjava3.core.Single<int[]> screenSize()返回当前环境的屏幕尺寸。 -
openWebBrowser
io.reactivex.rxjava3.core.Single<ComputerState> openWebBrowser()打开网页浏览器。 -
clickAt
在网页上点击指定的 x、y 坐标。 -
hoverAt
在网页上的某个特定 x、y 坐标处悬停。 -
typeTextAt
io.reactivex.rxjava3.core.Single<ComputerState> typeTextAt(int x, int y, String text, Boolean pressEnter, Boolean clearBeforeTyping) 在指定的 x、y 坐标处显示文本。 -
scrollDocument
将整个网页朝某个方向滚动。 -
scrollAt
io.reactivex.rxjava3.core.Single<ComputerState> scrollAt(int x, int y, String direction, int magnitude) 在指定的 x、y 坐标处,按照指定的幅度进行滚动。 -
wait
等待指定的时间长度。 -
goBack
io.reactivex.rxjava3.core.Single<ComputerState> goBack()返回上一个页面。 -
goForward
io.reactivex.rxjava3.core.Single<ComputerState> goForward()向前导航。 -
search
io.reactivex.rxjava3.core.Single<ComputerState> search()直接跳转到搜索页面。 -
keyCombination
按下某个按键组合。 -
dragAndDrop
io.reactivex.rxjava3.core.Single<ComputerState> dragAndDrop(int x, int y, int destinationX, int destinationY) 支持拖放操作。 -
currentState
io.reactivex.rxjava3.core.Single<ComputerState> currentState()返回当前状态。 -
initialize
io.reactivex.rxjava3.core.Completable initialize()启动计算机。 -
close
io.reactivex.rxjava3.core.Completable close()清理资源。 -
environment
io.reactivex.rxjava3.core.Single<ComputerEnvironment> environment()返回当前的环境信息。
-