Wait for element to appear (CV)
Waits for a CV element to appear.
1. Component introduction
Waits for a control element of a specified CV pattern to appear.
2. Inputs
For details about each input parameter, refer to the help information in the application flow editor.
3. Outputs
None
4. Component usage examples
4.1. Component configuration example
For Target control, select the captured CV pattern control element.
Set Control index to 1.
Keep the default values for the advanced options.
4.2. Example execution result
None
5. Flow creation example
Setup flow
Use the Get Window component to retrieve the DingTalk window object and save it as `v_win_obj_1`. Pass `v_win_obj_1` to the Opened window object parameter of the Activate Window component.
Use the Activate Window component to bring the DingTalk window to the foreground.
Use the Move Mouse (CV) component to move the mouse to the search box in DingTalk.
Use the Click Mouse component to click the search box.
Use the Delayed Execution component to wait for two seconds. This ensures the cursor is in the input box.
Use the (Simulated) Keyboard Text Input component to enter a contact or group name.
Use the Wait for Element to Appear (CV) component to wait for the contact to appear in the search results.
Use the Delayed Execution component to wait for one second. This helps ensure that pressing the Enter key in the next step is successful.
Use the Input Hotkey component to press the Enter key.
Use the Delayed Execution component to wait. This ensures the view switches to the contact's chat session before the next steps are executed.
Use the Click Control (CV) component to click the Settings button in the chat session.
Use the Click Control (CV) component to click the Clear Chat History button.
Use the Click Control (CV) component to click the OK button in the dialog box to clear the chat history.
Use the Fill Input Box (CV) component to enter a message in the chat input box.
Use the Click Control (CV) component to click the Send button.
Execution result
This flow sends a message to a contact in DingTalk. It uses the Wait for Element to Appear (CV) component to improve the flow's reliability. The component waits for an element to appear, which is useful for handling network or application load delays. The flow only proceeds to the next step after the specified element appears.
If you find this topic helpful, click Like.