Hello, I am processing the application, some time the application should be view at black screen for that time once we click the screen, the another tab should be pops up. while debugging the code, the click activity should worked , while run the file, the click activity is not working. How we handle it?
For that you can use the Check app state activity to check the black screen. If it shows the black screen in target appears block give the click activity to click on the screen. Don’t give any activity in target doesn’t appears.
Sequence DisplayName="Browser Sequence"
Add activities inside the browser sequence
Navigate to a webpage
NavigateTo Url="https://www.example.com"
Click on a button (replace the selector)
Click Target="Selector" WaitForReady="COMPLETE"
Handle a pop-up (replace the selector)
TryCatch
Try
Click Target="PopUpSelector" WaitForReady="COMPLETE"
Log Message="Pop-up not found!" LogLevel="Error"
You can check the application loading status using Element exists or Check app state with wait for ready complete property and you may increase the time as well as per needs and for click activity add click in attach window or use application or browser container so that bot can identify the button.
Okay then Instead of using the check app state activity, use the CV Element exist activity. In this activity indicate the Black screen, output of this activity is in Boolean.
After CV Element exist activity, insert the If condition to check the bool flag, In then block give the CV click activity to click on the screen, don’t give any activity in else block.