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();
    }
}
相关推荐
我的xiaodoujiao10 小时前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 37--测试报告 Allure 前置步骤-配置安装 JDK 详细图文教程
java·开发语言·学习·测试工具
老华带你飞10 小时前
婚纱摄影网站|基于java + vue婚纱摄影网站系统(源码+数据库+文档)
java·开发语言·前端·数据库·vue.js·spring boot
.ZGR.10 小时前
Java小项目——文件管理系统 V3.0
java·开发语言
Zsh-cs10 小时前
Maven
java·maven
BD_Marathon10 小时前
Spring系统架构
java·spring·系统架构
小明和大树10 小时前
JAVA 学习笔记 三
java·笔记·学习
Hello.Reader10 小时前
Flink ML Bucketizer 连续特征分桶(多列映射、splitsArray、handleInvalid)+ Java 示例解读
java·算法·flink
糕......10 小时前
Java IO流:数据传输的艺术与机制
java·开发语言·网络·学习
a程序小傲10 小时前
蚂蚁Java面试被问:分布式Session的实现方案
java·分布式·面试