<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap"disabledv-if='nowNode["parameters"]["codeMode"] == 5'>This option is an advanced feature that allows direct manipulation of the running browser using Python code. You can also customize variables in the entire execution environment and perform operations such as modifying and assigning values. Here are some examples:
1. 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").send_keys(Keys.CONTROL + "t")` to open a new tab.
<label>Code (Use Field["FieldName"] to input the lastest value of a field): </label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="2"v-model='nowNode["parameters"]["code"]'placeholder="Please input a JavaScript command or a system command. For example, document.body.innerText = '1' is an example of a JavaScript command, and python D:/test.py is an example of a system command. If you choose to execute a JavaScript script for the current iteration, you can represent the element of the current iteration using arguments[0]. For instance, arguments[0].style.color = 'blue' sets the color of the element in the current iteration to blue."></textarea>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap; border-radius: 0; border: 1px solid"disabledv-if='nowNode["parameters"]["codeMode"] == 5'>This option is an advanced feature that allows direct manipulation of the running browser using Python code. You can also customize variables in the entire execution environment and perform operations such as modifying and assigning values. Here are some examples:
1. 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").send_keys(Keys.END)` to scroll to the bottom.
2. Define a global variable: `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)`
If you want to record your custom variable as a field, please select the next option, "Evaluate Python expressions in the execution environment."</pre>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap"disabledv-if='nowNode["parameters"]["codeMode"] == 6'>This option is an advanced feature that allows directly returning 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` to return the text on the current page.
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap; border-radius: 0; border: 1px solid"disabledv-if='nowNode["parameters"]["codeMode"] == 6'>This option is an advanced feature that allows directly returning 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` to return the text on the current page.
2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1`
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, "Evaluate Python expressions in the execution environment."</pre>
<label>Code (Use Field["FieldName"] to input the lastest value of a field): </label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="2"v-model='nowNode["parameters"]["code"]'placeholder="Please input a JavaScript command or a system command. For example, document.body.innerText = '1' is an example of a JavaScript command, and python D:/test.py is an example of a system command. If you choose to execute a JavaScript script for the current iteration, you can represent the element of the current iteration using arguments[0]. For instance, arguments[0].style.color = 'blue' sets the color of the element in the current iteration to blue."></textarea>
<pstyle="margin-top: 15px">Whether to record the output/return value of the execution as a field: </p>
@ -472,13 +472,13 @@ Please note that this feature does not support assigning values to variables. In
<textareaonkeydown="inputDelete(event)"class="form-control"rows="3"placeholder="One text/URL per line. Each line is A text/URL, and the text is divided by ~, that is, if the value of A line is A~B, the index value can be set to 1 for A, 2 for B, and 0 for A~B in the input text operation."v-model='nowNode["parameters"]["textList"]'></textarea>
</div>
<divv-else-if='parseInt(loopType) < 8'>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 220px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap"disabledv-if='parseInt(loopType) == 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".
<label>Code (Use Field["FieldName"] to input the lastest value of a field):</label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="3"v-model='nowNode["parameters"]["code"]'placeholder="Continue the loop if the command return value is greater than 0 or evaluates to true; otherwise, stop the loop. For example, return document.body.scrollWidth > 1000 is an example of a JavaScript command return value, and python D:/test.py is an example of a system command return value."></textarea>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 220px; font-size: 15px!important; word-wrap: break-word; white-space: pre-wrap; border-radius: 0; border: 1px solid"disabledv-if='parseInt(loopType) == 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".
2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1`
If the expression returns a value greater than 0 or evaluates to True, the loop continues; otherwise, it stops.</pre>
<label>Code (Use Field["FieldName"] to input the lastest value of a field):</label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="3"v-model='nowNode["parameters"]["code"]'placeholder="Continue the loop if the command return value is greater than 0 or evaluates to true; otherwise, stop the loop. For example, return document.body.scrollWidth > 1000 is an example of a JavaScript command return value, and python D:/test.py is an example of a system command return value."></textarea>
<label>Maximum wait time for script execution (0 represents unlimited wait time): </label>
@ -542,13 +542,13 @@ If the expression returns a value greater than 0 or evaluates to True, the loop
<textareaonkeydown="inputDelete(event)"requiredplaceholder="If the current loop contains elements, input the xpath of the relative element (such as '/div[2]/div[1]/img', if written in relative path, it should be written as '/*//img', which means checking whether there exists an 'img' tag among all the descendant elements of the current loop item.)."class="form-control"rows="3"v-model='nowNode["parameters"]["value"]'></textarea>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word!important; white-space: pre-wrap"disabledv-if='TClass == 8'>Use the expression value of Python code to determine whether a condition is satisfied. 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".
<label>Code/Script Content: </label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="3"v-model='nowNode["parameters"]["code"]'placeholder="If the return value is greater than 0 or true, the operations within this branch will be executed; otherwise, they will not be executed. For example: return document.body.scrollWidth > 1000 or python D:/test.py, representing examples of JS command and system command return values."></textarea>
<preclass="form-control"style="background: white; margin-top: 20px; min-height: 200px; font-size: 15px!important; word-wrap: break-word!important; white-space: pre-wrap; border-radius: 0; border: 1px solid"disabledv-if='TClass == 8'>Use the expression value of Python code to determine whether a condition is satisfied. 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".
2. Return the value of a custom global variable: `self.myVar`
3. Return the result of a conditional statement: `self.myVar == 1`
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>
<label>Code/Script Content: </label>
<textareaonkeydown="inputDelete(event)"class="form-control"rows="3"v-model='nowNode["parameters"]["code"]'placeholder="If the return value is greater than 0 or true, the operations within this branch will be executed; otherwise, they will not be executed. For example: return document.body.scrollWidth > 1000 or python D:/test.py, representing examples of JS command and system command return values."></textarea>
<label>Maximum wait time for script execution (0 represents unlimited wait time): </label>