天天看點

UiBot基本使用下載下傳uibot creator使用

項目中遇到需要自動登入功能,想着用機器人實作。是以有了這篇部落格,記錄下基本用法。

下載下傳uibot creator

下載下傳連結:https://www.uibot.com.cn/

使用

插件安裝

若使用uibot操作火狐或者谷歌浏覽器,需要給浏覽器裝插件。

UiBot基本使用下載下傳uibot creator使用

 功能實作

此處實作的功能如下:程式運作,自動打開chrome,打開百度,搜尋uibot。

UiBot基本使用下載下傳uibot creator使用
UiBot基本使用下載下傳uibot creator使用
UiBot基本使用下載下傳uibot creator使用
UiBot基本使用下載下傳uibot creator使用

 點選流程塊右上角的編輯按鈕

UiBot基本使用下載下傳uibot creator使用
UiBot基本使用下載下傳uibot creator使用

 從左側樹形菜單将将要實作的功能拖到右側即可。

此處的核心功能用js實作

UiBot基本使用下載下傳uibot creator使用

 源碼:

Dim sRet = ""
Dim bRet = ""
Dim iRet = ""
Dim hWeb = ""
hWeb = WebBrowser.Create("chrome","www.baidu.com",30000,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200,"sBrowserPath":"","sStartArgs":""})
TracePrint hWeb
sRet = WebBrowser.RunJS(hWeb,'''function(){
    document.getElementById('kw').value = 'uibot';
    document.getElementById('su').click();
    return 123;
    }''',True,{"bContinueOnError":False,"iDelayAfter":300,"iDelayBefore":200})


           
UiBot基本使用下載下傳uibot creator使用

 點選運作即可實作功能。