cancel
Showing results for 
Search instead for 
Did you mean: 

Problem identifying HTML element

DanielLago_Gil
Level 2
Hello, I'm learning Blue Prism and I have run into a few errors, but one of them is speacially weird for me.

So, I was doing this Amazon exercise where I need to create a robot that searches for a book, and for one of the steps I had to log in. 
So, I spied the text boxes for email and password and the buttons needed to do so. This elements seem to be working correctly, because I can higlight them properly. But there's something weird going on with the password.
As I said, it Highlights it self properly, but when I get into the write step where it's suppoused to write the password, this error runs out:
"Internal : Failed to perform step 1 in Write Stage 'Write Password' on page 'Log In' - No element matched the query terms"
I understand that this error means that the element wasn't identified succesfully based on the elements I checked on the Application Modeller, but that seems kind of odd, because, when I Higlight it works. Also, and to make this worse, if I press the play button again, after this error pops out, the robot writes the password like nothing happened.
Why does it fail the first time and succed the second one? Why does it fail at all if the element seems to be propperly identified? Does anyone know?

------------------------------
Daniel Lago Gil
------------------------------
5 REPLIES 5

diane.sanzone
Level 7
Hi Daniel,

Can you post a screenshot of the attributes you have selected for the password field?  Also, are you using a writer field or a navigate with global send keys?

------------------------------
Diane Sanzone
------------------------------

lookman
Staff
Staff
Hi Daniel,

That does sound odd. You point out that after you get the message that the element is not found, if you try again the element is found (you press play again). 

When you get the error, try highlighting the field - DO NOT press play button. Based on the issue you are describing, I expect the field will not be found. Create another test field and spy the same element that failed and compare the two to see if there are any differences. This will at least give you an indication on how that field is defined and perhaps will lead you to a solution.

jack


------------------------------
Jack Look
Sr Product Consultant
Blue Prism
------------------------------

ManpreetKaur1
Level 8
HI @DanielLago_Gil,

Did you use AA mode to spy the password textbox?
It might be possible that the textbox is not visible at the first time (with blueprism or any other application being the activated application) which resulted in failure of the highlighted item. Hence it is advisable to activate the application before performing any action.

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------

bruce.liu
Staff
Staff

Hi Daniel,

Modern websites are quite dynamic in nature. This means elements spied at one time may not still be valid when the page state has changed. Such change can be caused by you performing navigation, triggering JavaScripts and etc. The most difficult part is that you often need to learn it the hard way and then look back into how you can optimise your attributes to work for the specific website.

One common culprit is to include Web Path attribute, which is built based on HTML DOM hierarchy at the time when you spied the element. You should try avoiding Web Path using a fixed value, or not using it completely if possible for such websites. XPath and CSS Selector can be really useful ally in this kind of situation, due to their ability to focus on a small part of the HTML that uniquely identifies the element, as opposed to everything from the top of the hierarchy to the element in question.


There may be other factos in play. A good approach when you encounter this issue is to spy the web element again in a new element and compare it with what you spied before. That may often reveal the reason for the discrepency.

Hope this helps.



------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

In such a scenario, you can also try to Focus on the element first and then write the data.

And as Manpreet said, Activate also plays a major role in making sure that the target application is on top of the view.

------------------------------
If I was of assistance, please vote for it to be the "Best Answer".

Thanks & Regards,
Tejaskumar Darji
Sr. Consultant-Technical Lead
------------------------------