cancel
Showing results for 
Search instead for 
Did you mean: 

Browser Automation: "No Element match" every nth time

SandroPaetzold
Level 3
Hi Guys, I hope the is the right forum. I have a problem with a website, I try to describe my issue: I have a list of items and the robot should accept all these items. Therefor the robot opens the first item and clicks on an accept button. After returning to the list, the accepted item does not appear again on the list and he will pick the first item again. This works, so far, but sometimes he is unable to find the accept button. This means, the robot can process some items (mostly between 10 and 20) and then he runs into an Exception €œNo elements match the supplied query€. I already designed a loop with a 30 second wait stage that tries to find the element 3 time, but that doesn€™t help. Currently I terminate the whole Browser and restart the process, but I hope there is a much better way a make the process much more stable. I appreciate your help Sandro
7 REPLIES 7

Denis__Dennehy
Level 15
Is there something about your element that is not consistent? If you run this solution in Studio with breakpoints to trap when the error occurs, you should be able to then go into Application Modeller, identify the button again into a new element, and see what is different between the new and existing elements. This should hopefully help you to find the cause of the element not being found.

Hi Denis, thanks for your reply. Everything that changes is already unchecked. If I run the process in Studio and wait for this issue, I am able to highlight the element in Application Modeler. It is just in the process that the element could not be found.

asilarow
MVP
Are you per chance matching on the ""screen visible"" element? If so then un-tick it... it can cause issues when running from control room. Other than that... check whether the Accept button needs to be active before clicking - and by active I mean in direct focus on the screen. You can do that by using the ""Activate Application"" action in a Navigate stage, prior to clicking the button. Also bear in mind that Activate Application is only available for window type elements in Win32 spying mode. Hope this helps.
Andrzej Silarow

SandroPaetzold
Level 3
Hi Asilarow, thanks for your reply. I have ""Class Name"", ""Enabled"", ""ID"", ""Tag Name"" and ""Value"" selected, and for me there is no ""Screen Visible"" attribute. Would you be so kind to explain what you mean? The application is focused and even it is not focused BP is mostly able to click on the button. In the case he isn't able, it doesn't matter if the IE has the Focus or not. However, i tried the focusing before the click Action and it doesn't Change anything. I would appreciate any other ideas. Thanks Sandro

SandroPaetzold
Level 3
Hi, did anyone else has an idea? The issue still exists. Is there a way to force BP to parse the website again? Thanks Sandro

Denis__Dennehy
Level 15
Is the wait stage at the start of your action using 'Parent Document Loaded' as recommend in the Browser Automation Guide? It could be whatever you are waiting for exists a fraction of a second before the element you want to use because a web page does not load all at once. Parenet document loaded would instead wait for an element and then continue waiting for the entire web page to be loaded - so that you know all your elements should exist.

SharazKM
Level 4
Hi Sandro , ""I have ""Class Name"", ""Enabled"", ""ID"", ""Tag Name"" and ""Value"" selected, and for me there is no ""Screen Visible"" attribute. Would you be so kind to explain what you mean?"" for this comment - I can reply . What he meant is to capture another element(Better complete screen) from which you are trying to do these actions using Application modular -win 32 mode. Once that is captured -using Navigate option in object studio -select this element and you can see action as ""Activate Application"" for this element. This will activate the screen whenever you run the process using this object. After this copy the actions you are planning to do. Hope this helps you to understand the concept what Asilarow was mentioned