Hey Guys.
How do you use Image exists activity? I have used it before but having problems with it now. For some reason it is not working for me. Basically I have web application that displays different text boxes based on whether a user has already signed in or a new user wants to sign. So if a new user wants to sign in they have to click the add new user button and then perform the login in details otherwise it is the normal login details process. So I have set up an image exists and it is stored as a bool called messageAppears. Then I used an if condition activity to set it to if messagesAppears then perform normal action else do extra step of adding new user then the perform normal login process. The “Then” part of the if statement works but the else does not get hit. Any ideas?
Instead of Image Exists activity try with Element Exists activity and then check once. It will also give boolean value as output.
I have also tried this as well. Same result. It does not reach the else part
Have you set any default value to that Boolean variable as True?
If yes then delete it. Is it going to Then part every time irrespective of that Element Exists?
I have not set a default value. It does the then part when it is at the correct stage. But when the then part is not avaliable is not avaliable it does not go to the else condition. It simply waits and then ends the process without an action.
Try to print that Boolean value using Message Box activity after Element Exists activity and then check once.
varElementExists.Tostring
Ok. I added this to the workflow. It prints true all the time. Even when the condition is susposed to be false.
Yes may be because of that all time it’s going to Then part instead of Else part.
Try to indicate exact element in the page and check selector also once.
What do I have to do to the selector. Just include a * wildcard? So the element I am grabing is the word sign in as if this is not present then the robot needs to use the add account button in the else part of the condition.
Yes use the wild card and make selector dynamic. Once it done validate the selector in both cases and then check it.
Sorry but I am not sure where to add it.
Is it possible to access that site from my end?
And also help me with screenshot of that page and tell me which one you want check in that.
No it is not possible it is an internal web application. But I tried flipping the condition around and it still always goes to true. So something is broke. Can you share a sequence of it working?
I don’t have any examples.
Do one thing. First login with credentials and if he doesn’t register then it will show pop up like account does not exist right. Indicate that pop up and if it exists then continue reload the page and record steps to create new account else do other steps.
Ok so it works in a different process I tried but not on the word I want it to work on. But my understanding of element exist is correct. Not sure why it does not work. I will try to incidate a different element on the screen.
Hi, Please do this change the number or value in image exits properties.
Normally, this activity work fine if play with Accuracy level in properties according to your web_page. Refer to screen shot.
Also, very careful with selector when you work with web_based application the selector always get change each time when page load.
I got it working. I changed the element to something different. It works fine now. Thanks for your help @lakshman and @daljit_parmar