I am using element exists activity with If. In both cases of true and false it is showing the message box of false. Although the value of the flag is true.
Hi @nashrahkhan
Check the two things
-
Whether the element is loading correctly
-
instead of flag.ToString.Equals(“true”) put as flag.ToString.Equals(“True”)
Try this and let me know if it works
Regards
Nived N
Happy Automation
Hi @nashrahkhan,
Welcome to community forum.
Can you please try by giving only flag in if condition and let me know its working fine or not?
Regards
Pravat
@nashrahkhan
In the If condition just have the variable Flag and check. No need to convert it to String etc.
Hi @nashrahkhan
Actually Element exist output is always boolean(True or False) . Your case you have given the condition flag. tostring that is equals to True.
So True=“true” is false thats why it goes to else part.
Hope now its clear. Happy automation!!
Regards
Pravat
Check whether you have supplied the Flag variable in the output of activity Element exists
And in If condition, just keep only Flag.
I introduce the Flag variable but I noticed it is not correctly saving the values.
What should I do?
Saving the values means @nashrahkhan
For example it is always showing the "True " value irrespective of the element exist or not.
@nashrahkhan - could be try:
-
when the element is hidden, edit the selector of “Element Exists” and click “Validate”. If the selector validates, it could be that you will need to use a different selector or add something more specific (like innerHTML)
-
is the “Element Exists” activity in any loop? If yes, try setting “Flag” = False in the True condition of “If”
@sumitd
Thank you for your feedback. It was resolved. That element was present at the page but was hidden at html level that’s why its giving the true value repeatedly.
I have used image exists in that and it is now resolved.
Yup, thought so @nashrahkhan - glad its solved!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.