Aibote4j java封装版本的

Aibote4j 交流Q群:496086899

开源地址:https://github.com/1341191074/aibote4j

更新yolo和ocr相关新增的能力,比较强劲了

下面是使用的案例

java 复制代码
public class WebBotTest extends WebBot {

    public static void main(String[] args) {
        WebBotServer webBotServer = new WebBotServer();
        webBotServer.runLocalClient(19028, null, 0, null, null, null, null);
        webBotServer.startServer(WebBotTest.class, 19028);
    }

    //模拟远程启动
    //WebDriver.exe "{\"serverIp\":\"127.0.0.1\",\"serverPort\":19028,\"browserName\":\"chrome\",\"debugPort\":9223,\"browserPath\":\"null\",\"argument\":\"null\",\"userDataDir\":\"null\",\"extendParam\":\"\"}"
    @Override
    public void webMain() {
        this.sleep(5000);

        boolean ret = this.navigate("https://www.xxxxx.com/");//url必须带http://
        log.info(String.valueOf(ret));

        String curPageId = null;
        curPageId = this.getCurPageId();
        log.info("第一次获取pageId : " + curPageId);

        this.sendKeys("//*[@id=\"nav-searchform\"]/div[1]/input", "aibote");
        this.sleep(5000);

        this.clickElement("//*[@id=\"nav-searchform\"]/div[2]");
        this.sleep(5000);

        curPageId = this.getCurPageId();
        log.info("第二次获取pageId : " + curPageId);

        String myconf = (String) super.ymlConfig.get("myconf");
        System.out.println(myconf);

//        this.switchPage(curPageId);
//        this.clickElement("//*[@id=\"nav-searchform\"]/div[2]");
//        try {
//            Thread.sleep(2000);
//        } catch (InterruptedException e) {
//        }

        //String base64 = this.takeScreenshot(null);
        //log.info(base64);
        //this.closeBrowser(); //关闭浏览器时,driver会一同关闭
        //this.closeDriver();
    }
}
相关推荐
BduL OWED23 分钟前
Redis之Redis事务
java·数据库·redis
FastBean32 分钟前
BizAssert:一个轻量级、生产就绪的 Java 业务断言工具类
java·后端
zhuiyisuifeng39 分钟前
Node.js使用教程
java
李庆政3701 小时前
Reactor-core 响应式编程 spring-boot-starter-webflux
java·spring boot·reactor·响应式编程·reactor-core
是Smoky呢1 小时前
springAI+向量数据库+RAG入门案例
java·开发语言·ai编程
huabiangaozhi1 小时前
修改表字段属性,SQL总结
java·数据库·sql
请为小H留灯1 小时前
一键解决 IDEA 中 Java 项目变橙色的问题!!!
java·ide·maven·intellij-idea·java项目
小文大数据1 小时前
python实现HTML转PDF
java·前端·数据库
架构师沉默1 小时前
为什么 Dubbo 从 ZooKeeper 转向 Nacos?
java·后端·架构
用户8307196840821 小时前
Spring Prototype Bean的四种正确使用方式
java·spring boot·后端