start
Table of Contents
Yatbot Script Functions
Yatbot supports scripts, they are c# based with some custom functions to make life easier for users.
Navigate
Navigate to a url.
Parameter | Description | Type |
---|---|---|
url | destination url | string |
Example:
Navigate("https://duckduckgo.com");
Sleep
Pauses the script
Parameter | Description | Type |
---|---|---|
minSec | minimum seconds to pause | int |
maxSec | maximum seconds to pause (optional) | int |
Example:
Sleep(4); Navigate("https://devitools.com"); Sleep(5,10);
Click
Click in a html element of the page.
Parameter | Description | Type |
---|---|---|
xpath | xpath of the html element | string |
Example:
Navigate("https://example.org"); Sleep(3); Click("/html/body/div/p[2]/a");
Javascript
Runs javascript in the current page.
Parameter | Description | Type |
---|---|---|
js | javascript command | string |
Example:
Javascript("alert('Hello World')");
TabFocus
Change the focus to a different tab.
Parameter | Description | Type |
---|---|---|
tabIndex | tab index | int |
Example:
Navigate("http://example.org"); Javascript("window.open('http://example.net')"); Sleep(2); TabFocus(0);
start.txt · Last modified: 2022/12/08 10:18 by admin