I have to click on a button once logged in to a page. So first i am checking through Element Exists activity if the button is loaded in the page. This activity is just after clicking the login button.
Then i have put a condition if the exist output is true. If True, click the button Else a message box that button is not loaded. I am getting the message immediately after login.
My question is by default the Element Exists should wait for 30 seconds right ? Then why its not waiting till that time and directly moving to the else part?
maybe here a problem in selector, so if he can’t found the element, then the bot will go trough the else part, check first if the selector is right
and you can in WaitForReady, select the complete propertie, and try again if it works
Please read thee below properties and need any clarification please let me know this will work for you and resolve your issue:
Target.TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run before the SelectorNotFoundException error is thrown. The default value is 30000 milliseconds (30 seconds).— If You want then increase it also.
Target.WaitForReady - Before performing the actions, wait for the target to become ready. The following options are available:
None - Does not wait for anything except the target UI element to exist before executing the action. For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements that are not yet loaded, such as scripts.
Interactive/Complete - Waits all of the UI elements in the target app to exist before actually executing the action.
To assess if an application is in the Interactive or Complete state, the following tags are verified:
Desktop applications - A wm_null message is sent to check the existence of the <wnd> , <ctrl> , <java> , or <uia> tags. If they exist, the activity is executed.
Web applications:
a. Internet Explorer - The <webctrl> tag is used to check if the Ready state of the HTML document is set to Complete . Additionally, the Busy state has to be set to “False”.
b. Others - The <webctrl> tag is used to check if the Ready state of the HTML document is Complete .
SAP applications - First the presence of the <wnd> tag verified, after which a SAP specific API is used to detect if the session is busy or not.
the answer can be found debugging your project in that part dude, go debug your project, you can watch which is the reason, then if you found any error, we can help you of course
because you are telling the activity to search the application as it is at that moment, as soon as it finishes searching it goes away, so it is so fast the app is not fully loaded…
Target.WaitForReady - Before performing the actions, wait for the target to become ready. The following options are available:
None - Does not wait for anything except the target UI element to exist before executing the action. For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements that are not yet loaded, such as scripts.
Actually sometimes it is able to click the button and sometimes not. So it is not the problem with the selector. And even if the selector is incorrect it should still wait for 30 seconds. Why is it not waiting ?
If it really is interactive and it not really waiting 30 seconds and is fast to output FALSE, then your application might be harder to control, try putting a fixed delay before the element exists with like 5 seconds or more just for testing…
How to implement the below? Please suggest. Web applications:
a. Internet Explorer - The <webctrl> tag is used to check if the Ready state of the HTML document is set to Complete . Additionally, the Busy state has to be set to “False”.