Bläddra i källkod

Update Example of Exec and Eval

pull/182/head
naibo 1 år sedan
förälder
incheckning
3a3edd3558
19 ändrade filer med 735 tillägg och 6 borttagningar
  1. +3
    -3
      .temp_to_pub/EasySpider_MacOS_all_arch/浏览器闪退解决方案(点击设计任务后Chrome弹出后立马退出).txt
  2. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/39.json
  3. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/40.json
  4. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/41.json
  5. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/42.json
  6. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/43.json
  7. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/44.json
  8. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/45.json
  9. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/46.json
  10. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/47.json
  11. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/48.json
  12. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/49.json
  13. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/execution_instances/50.json
  14. +706
    -0
      .temp_to_pub/EasySpider_windows_x64/info.log
  15. +1
    -1
      .temp_to_pub/EasySpider_windows_x64/tasks/218.json
  16. +1
    -0
      .temp_to_pub/EasySpider_windows_x64/tasks/220.json
  17. +5
    -1
      ElectronJS/src/taskGrid/FlowChart.html
  18. +6
    -1
      ElectronJS/src/taskGrid/FlowChart_CN.html
  19. +1
    -0
      d

+ 3
- 3
.temp_to_pub/EasySpider_MacOS_all_arch/浏览器闪退解决方案(点击设计任务后Chrome弹出后立马退出).txt Visa fil

@ -1,9 +1,9 @@
如果点击"使用浏览器设计"按钮后Chrome弹出并闪退,需要按照以下流程操作: 如果点击"使用浏览器设计"按钮后Chrome弹出并闪退,需要按照以下流程操作:
MacOS版本的软件有一个问题可能存在,即软件所调用的Chrome软件会在打开后经常性自动更新,但软件所依赖的Chromedriver版本并不会随着chrome自动更新,从而导致软件打不开chrome的问题。
检查Chrome版本的方式为:进入EasySpider软件内部,即右键软件“显示包内容”,然后进入Contents/Resources/app文件夹内,手动双击打开chrome_mac64软件打开chrome,然后打开设置->关于Chrome来查看Chrome版本是否和手动打开chromedriver_mac64后显示的版本相同。
MacOS版本的软件有一个问题可能存在,即软件所调用的Chrome软件会在打开后经常性自动更新,但软件所依赖的Chromedriver版本并不会随着Chrome自动更新,从而导致软件打不开Chrome的问题。
检查Chrome版本的方式为:进入EasySpider软件内部,即右键软件“显示包内容”,然后进入Contents/Resources/app文件夹内,手动双击打开chrome_mac64软件打开Chrome,然后打开设置->关于Chrome来查看Chrome版本是否和手动打开chromedriver_mac64后显示的版本相同。
如果不是,请自行到以下网址下载对应自己当前chrome版本的macOS版本的chromedriver:https://googlechromelabs.github.io/chrome-for-testing,并将chromedriver文件放在上面提到的Contents/Resources/app文件夹内,更名并替换掉“chromedriver_mac64”文件即可使软件恢复正常使用。
如果不是,请自行到以下网址下载对应自己当前Chrome版本的macOS版本的Chromedriver:https://googlechromelabs.github.io/chrome-for-testing,并将chromedriver文件放在上面提到的Contents/Resources/app文件夹内,更名并替换掉“chromedriver_mac64”文件即可使软件恢复正常使用。
如果使用过程中发现其他问题,请到Github Issues页面提issue。 如果使用过程中发现其他问题,请到Github Issues页面提issue。

+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/39.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/40.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/41.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/42.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/43.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/44.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/45.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/46.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/47.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/48.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/49.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/execution_instances/50.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 706
- 0
.temp_to_pub/EasySpider_windows_x64/info.log Visa fil

@ -0,0 +1,706 @@
Server has started.
server_address: http://localhost:8074
x64
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64\EasySpider\resources\app\chrome_win64\chromedriver_win64.exe D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64\EasySpider\resources\app\chrome_win64\chrome.exe D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64\EasySpider\resources\app\chrome_win64\execute.bat
win32
Server listening on http://localhost:8075
Not Windows 7
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 0 } }
set socket_window
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: { type: 0, message: { id: 'C91060802', title: 'Start' } }
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: { type: 0, message: { id: 'C42837719', title: 'New Task' } }
Set handle_pair for id: C91060802 to DE25B0D62688DC2CEAA4858701D1C25A , title is: Start
GET A MESSAGE: {
type: 3,
from: 0,
message: {
pipe: '{"type":"openPage","url":"https://www.jd.com","links":"https://www.jd.com"}'
}
}
FROM Browser: {
type: 'openPage',
url: 'https://www.jd.com',
links: 'https://www.jd.com'
}
Iframe: undefined
GET A MESSAGE: { type: 1, message: { id: -1 } }
Window {
id: 26086070,
processId: 138328,
path: 'D:\\Documents\\Projects\\EasySpider\\.temp_to_pub\\EasySpider_windows_x64\\EasySpider\\resources\\app\\chrome_win64\\chrome.exe'
}
GET A MESSAGE: { type: 0, message: { id: 'C73544475', title: '京东全球版-专业的综合网上购物商城' } }
Set handle_pair for id: C42837719 to DE25B0D62688DC2CEAA4858701D1C25A , title is: New Task
Set handle_pair for id: C73544475 to DE25B0D62688DC2CEAA4858701D1C25A , title is: 京东全球版-专业的综合网上购物商城
GET A MESSAGE: {
type: 3,
from: 0,
message: {
pipe: `{"type":"singleCollect","history":4,"tabIndex":-1,"iframe":false,"parameters":[{"nodeType":0,"contentType":0,"relative":false,"name":"参数1_文本","desc":"","extractType":0,"relativeXPath":"/html/body/div[6]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","allXPaths":["/html/body/div[6]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]","//div[contains(., '/手机/数码')]","//DIV[@class='LeftSide_menu_item__SBMWC LeftSide_text_space__2UhbG LeftSide_menu_hover__OCHiO']","/html/body/div[last()-5]/div/div[last()-4]/div/div[last()-2]/div/div/div/div[last()-1]/div[last()-12]"],"exampleValues":[{"num":0,"value":"/手机/数码"}],"unique_index":"16i23xj4p54lm5zgdca","iframe":false}]}`
}
}
FROM Browser: {
type: 'singleCollect',
history: 4,
tabIndex: -1,
iframe: false,
parameters: [
{
nodeType: 0,
contentType: 0,
relative: false,
name: '参数1_文本',
desc: '',
extractType: 0,
relativeXPath: '/html/body/div[6]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]/div[1]',
allXPaths: [Array],
exampleValues: [Array],
unique_index: '16i23xj4p54lm5zgdca',
iframe: false
}
]
}
Iframe: false
GET A MESSAGE: { type: 3, from: 1, message: { pipe: '{"type":0,"value":2}' } }
FROM Flowchart: { type: 0, value: 2 }
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 45,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 45,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [45] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [45] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [45] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
45.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 46,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 46,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [46] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [46] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [46] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
45.json
46.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 47,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 47,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [47] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [47] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [47] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
45.json
46.json
47.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 48,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 48,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [48] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [48] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [48] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
45.json
46.json
47.json
48.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 49,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 49,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [49] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [49] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [49] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: {
type: 5,
message: {
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
}
{
id: -1,
user_data_folder: '',
mysql_config_path: '-1',
execute_type: 1
}
0.json
1.json
10.json
11.json
12.json
13.json
14.json
15.json
16.json
17.json
18.json
19.json
2.json
20.json
21.json
22.json
23.json
24.json
25.json
26.json
27.json
28.json
29.json
3.json
30.json
31.json
32.json
33.json
34.json
35.json
36.json
37.json
38.json
39.json
4.json
40.json
41.json
42.json
43.json
44.json
45.json
46.json
47.json
48.json
49.json
5.json
6.json
7.json
8.json
9.json
GET A MESSAGE: {
type: 5,
message: {
id: 50,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
}
{
id: 50,
user_data_folder: '',
mysql_config_path: './mysql_config.json',
execute_type: 1
}
D:\Documents\Projects\EasySpider\.temp_to_pub\EasySpider_windows_x64>if exist EasySpider (start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [50] --server_address http://localhost:8074 --user_data 0 ) else (if exist resources (
cd ../
start EasySpider/resources/app/chrome_win64/easyspider_executestage.exe --id [50] --server_address http://localhost:8074 --user_data 0
) else (start chrome_win64/easyspider_executestage.exe --id [50] --server_address http://localhost:8074 --user_data 0 ) )
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 0 } }
set socket_window
GET A MESSAGE: { type: 0, message: { id: 1 } }
set socket_start
GET A MESSAGE: { type: 0, message: { id: 'C33333281', title: 'Start' } }
GET A MESSAGE: { type: 0, message: { id: 'C71067632', title: 'Task Information' } }
Set handle_pair for id: C33333281 to C16928DEB37478FE68A811407561BFB2 , title is: Start
GET A MESSAGE: { type: 0, message: { id: 2 } }
set socket_flowchart
GET A MESSAGE: { type: 0, message: { id: 'C91491330', title: '设计流程' } }
Set handle_pair for id: C71067632 to C16928DEB37478FE68A811407561BFB2 , title is: Task Information
Set handle_pair for id: C91491330 to C16928DEB37478FE68A811407561BFB2 , title is: 设计流程
GET A MESSAGE: { type: 6 }
open devtools error

+ 1
- 1
.temp_to_pub/EasySpider_windows_x64/tasks/218.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 1
- 0
.temp_to_pub/EasySpider_windows_x64/tasks/220.json
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


+ 5
- 1
ElectronJS/src/taskGrid/FlowChart.html Visa fil

@ -381,10 +381,11 @@ This option is an advanced feature that allows direct manipulation of the runnin
2. Define a global variable: `self.myVar = 1` 2. Define a global variable: `self.myVar = 1`
3. Manipulate the above-defined global variable: `self.myVar = self.myVar + 1` 3. Manipulate the above-defined global variable: `self.myVar = self.myVar + 1`
4. Print the above-defined global variable: `print(self.myVar)` 4. Print the above-defined global variable: `print(self.myVar)`
5. Assign the value of a custom variable to the value extracted from a field: `self.myVar = self.outputParameters["Field Name"]`
If you want to record your custom variable as a field, please select the next option, "Get value of a Python expression (the "eval" operation)" If you want to record your custom variable as a field, please select the next option, "Get value of a Python expression (the "eval" operation)"
If you want to import and use a third-party library that the program itself does not carry, you need to first use tools such as pip to install this library locally, and then add the path of the installed library before import, like:
6. If you want to import and use a third-party library that the program itself does not carry, you need to first use tools such as pip to install this library locally, and then add the path of the installed library before import, like:
(1) In the system command line execute the following command to install the library: (1) In the system command line execute the following command to install the library:
pip install emotlib pip install emotlib
(2) Write the following code in the code box: (2) Write the following code in the code box:
@ -397,6 +398,7 @@ This option is an advanced feature that allows directly returning the expression
1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text` to return the text on the current page. 1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text` to return the text on the current page.
2. Return the value of a custom global variable: `self.myVar` 2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1` 3. Return the result of a conditional statement: `self.myVar == 1`
4. Determining whether the value extracted from a certain field is equal to the value of a certain variable: self.outputParameters["field name"] == self.myVar
Please note that this feature does not support assigning values to variables. In other words, you cannot write something like `self.myVar = 1`. If you want to perform assignment operations, please select the previous option, "Run Python code on current environment (the "exec" operation)"</pre> Please note that this feature does not support assigning values to variables. In other words, you cannot write something like `self.myVar = 1`. If you want to perform assignment operations, please select the previous option, "Run Python code on current environment (the "exec" operation)"</pre>
<p style="margin-top: 15px">Whether to record the output/return value of the execution as a field: </p> <p style="margin-top: 15px">Whether to record the output/return value of the execution as a field: </p>
<p><select v-model='nowNode["parameters"]["recordASField"]' class="form-control"> <p><select v-model='nowNode["parameters"]["recordASField"]' class="form-control">
@ -510,6 +512,7 @@ Loop based on the expression value of Python code. Here are some examples:
1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123". 1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123".
2. Return the value of a custom global variable: `self.myVar` 2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1` 3. Return the result of a conditional statement: `self.myVar == 1`
4. Determining whether the value extracted from a certain field is equal to the value of a certain variable: self.outputParameters["field name"] == self.myVar
If the expression returns a value greater than 0 or evaluates to True, the loop continues; otherwise, it stops. If the expression returns a value greater than 0 or evaluates to True, the loop continues; otherwise, it stops.
</pre> </pre>
<label>Maximum wait time for script execution (0 represents unlimited wait time): </label> <label>Maximum wait time for script execution (0 represents unlimited wait time): </label>
@ -582,6 +585,7 @@ Use the expression value of Python code to determine whether a condition is sati
1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123". 1. Return relevant values of the current browser object. Use `self.browser` to refer to the current browser being operated. You can directly use Selenium's API to perform operations, such as `self.browser.find_element(By.CSS_SELECTOR, "body").text=="123"`, which checks whether the current page contains the text "123".
2. Return the value of a custom global variable: `self.myVar` 2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1` 3. Return the result of a conditional statement: `self.myVar == 1`
4. Determining whether the value extracted from a certain field is equal to the value of a certain variable: self.outputParameters["field name"] == self.myVar
If the expression returns a value greater than 0 or evaluates to True, the operations within this branch will be executed; otherwise, they will be skipped. If the expression returns a value greater than 0 or evaluates to True, the operations within this branch will be executed; otherwise, they will be skipped.
</pre> </pre>
<label>Maximum wait time for script execution (0 represents unlimited wait time): </label> <label>Maximum wait time for script execution (0 represents unlimited wait time): </label>

+ 6
- 1
ElectronJS/src/taskGrid/FlowChart_CN.html Visa fil

@ -382,10 +382,11 @@
2. 自定义一个全局变量:self.myVar = 1 2. 自定义一个全局变量:self.myVar = 1
3. 操纵上面定义的全局变量:self.myVar = self.myVar + 1 3. 操纵上面定义的全局变量:self.myVar = self.myVar + 1
4. 打印上面定义的全局变量:print(self.myVar) 4. 打印上面定义的全局变量:print(self.myVar)
5. 将自定义变量的值赋值为某个字段提取的值:self.myVar = self.outputParameters["字段名"]
如果想要将自己定义的变量作为字段记录,请选择下一个“在执行环境下获得Python表达式值(eval操作)”选项。 如果想要将自己定义的变量作为字段记录,请选择下一个“在执行环境下获得Python表达式值(eval操作)”选项。
5. 如果想要引入并使用程序本身没有带的第三方库,需要先使用如pip等工具本地安装好此库,然后在import之前添加自己安装的库的路径,如:
6. 如果想要引入并使用程序本身没有带的第三方库,需要先使用如pip等工具本地安装好此库,然后在import之前添加自己安装的库的路径,如:
(1)在系统命令行执行安装emotlib库命令: (1)在系统命令行执行安装emotlib库命令:
pip install emotlib pip install emotlib
(2)在代码框中写入如下代码: (2)在代码框中写入如下代码:
@ -398,6 +399,8 @@ print(emotlib.emoji()) # 使用其中的函数。
1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text即可返回当前页面的文字。 1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text即可返回当前页面的文字。
2. 返回自定义全局变量的值:self.myVar 2. 返回自定义全局变量的值:self.myVar
3. 返回条件判断的值:self.myVar == 1 3. 返回条件判断的值:self.myVar == 1
4. 判断某个字段提取的值是否等于某个变量的值:self.outputParameters["字段名"] == self.myVar
注意此功能不能对变量进行赋值操作,即不可以写self.myVar = 1这种,如果想要进行赋值操作,请选择上一个“在执行环境下运行Python代码(exec操作)”选项。</pre> 注意此功能不能对变量进行赋值操作,即不可以写self.myVar = 1这种,如果想要进行赋值操作,请选择上一个“在执行环境下运行Python代码(exec操作)”选项。</pre>
<p style="margin-top: 15px">是否将执行后的输出/返回值作为字段记录:</p> <p style="margin-top: 15px">是否将执行后的输出/返回值作为字段记录:</p>
<p><select v-model='nowNode["parameters"]["recordASField"]' class="form-control"> <p><select v-model='nowNode["parameters"]["recordASField"]' class="form-control">
@ -511,6 +514,7 @@ print(emotlib.emoji()) # 使用其中的函数。
1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text=="123",表示判断当前页面是否为123这个文本。 1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text=="123",表示判断当前页面是否为123这个文本。
2. 返回自定义全局变量的值:self.myVar,如果 2. 返回自定义全局变量的值:self.myVar,如果
3. 返回条件判断的值:self.myVar == 1 3. 返回条件判断的值:self.myVar == 1
4. 判断某个字段提取的值是否等于某个变量的值:self.outputParameters["字段名"] == self.myVar
以上表达式返回值大于0或为真则继续循环,否则停止循环。 以上表达式返回值大于0或为真则继续循环,否则停止循环。
</pre> </pre>
<label>最长等待脚本执行时间(0代表无限等待): </label> <label>最长等待脚本执行时间(0代表无限等待): </label>
@ -583,6 +587,7 @@ print(emotlib.emoji()) # 使用其中的函数。
1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text=="123",表示判断当前页面是否为123这个文本。 1. 返回当前浏览器对象的相关值,用self.browser表示当前操作的浏览器,可直接用selenium的API进行操作,如self.browser.find_element(By.CSS_SELECTOR, "body").text=="123",表示判断当前页面是否为123这个文本。
2. 返回自定义全局变量的值:self.myVar,如果 2. 返回自定义全局变量的值:self.myVar,如果
3. 返回条件判断的值:self.myVar == 1 3. 返回条件判断的值:self.myVar == 1
4. 判断某个字段提取的值是否等于某个变量的值:self.outputParameters["字段名"] == self.myVar
以上表达式返回值大于0或为则执行此分支内操作,否则不执行。 以上表达式返回值大于0或为则执行此分支内操作,否则不执行。
</pre> </pre>
<label>最长等待脚本执行时间(0代表无限等待): </label> <label>最长等待脚本执行时间(0代表无限等待): </label>

d
Filskillnaden har hållits tillbaka eftersom den är för stor
Visa fil


Laddar…
Avbryt
Spara