Current selector is invalid error

Please find the attached image.
I’m passing some IDs to the form one by one by reading an excel and scraping the div. And this div element (selector) will show in the page only if there is any related data. Everything was working before and now Validate button is showing in red. Please help me to fix this.

@binoyav Can you Indicate the Element once again and show it in UiExplorer?

Its showing the validate button in green if I indicate again. And if I change the html title to * (since its dynamic) its showing as red. ? I changed that from “Selector Editor” form.

@binoyav Yes, Show us the Selector in when the Validate button is Green in UiExplorer

PFA

@binoyav Can you Check if it works with this Selector? When you give * in Title it means that it can be anything, Hence if there are other tabs open then it can match that browser window instead of this and will not be able to find the sub Selectors in it.

Im opening a browser by specifying the url from my uipath application and giving the id by reading an excel file and submitting the form. That id will show in the title. So I can not hardcode the title.

@binoyav Ok if you’re sure that id will always be present in the title as it is present in Excel file, then try giving this value to titlle
title = ‘*YourID_Value*’

you mean in the selector section in the properties panel ?

@binoyav Yes

PFA
Showing error on validate.
Also attaching the attach browser activity. There its *

@binoyav
Have a look here. It will help you on creating a dynamic selector and allows you validation of the selector as well

1 Like

Sorry… the issue is happening when the id is not found in db, that time the title is not changing. So I have to use “*” always I hope.
Also when I set the dynamic title using “Choose variable” option its not validating. Its working only with “Create variable”.

Any help ? The code is not stable. One day its working and the next day its not…

@binoyav You can try adding the variable to the selector as mentioned in the above posts or you can send the Selector in a text format, we’ll modify and send it back to you with variable added.

<html app='chrome.exe' title='{{newVar}} | Incident | Page name - Highly Confidential' />

I have made the html title as static, even though Im getting the title as


My page view source is showing as

Page name - Highly Confidential

Anything todo with attach browser ?

@binoyav - from the selector - pls remove title=‘*’ and try again. It will work fine.
just keep it simple like below -

<html app="chrome.exe" />

1 Like

@binoyav Have you tried keeping the title in this way and checked if it is working :
title =‘*{{newVar}}*’

This is the edit for my earlier post. I have added new variable
<html app='chrome.exe' title='{{newVar}} | Incident | Page name - Highly Confidential' /> <webctrl id='gsft_main' tag='IFRAME' /> <webctrl id='sn_form_inline_stream_entries' tag='DIV' />

I have made the html title as static, even though I’m getting the title as

    <html app='chrome.exe' title='INC2033897 | Incident | Page name - Highly Confidential' />
<webctrl id='gsft_main' tag='IFRAME' />
<webctrl id='sn_form_inline_stream_entries' tag='DIV' />

My page view source is showing as
Page name - Highly Confidential

Anything todo with attach browser ? Why the id is showing in selector editor even after I remove it ?

@binoyav - Just remove title from the selector and check - it will work perfectly.

> <html app='chrome.exe' />
> <webctrl id='gsft_main' tag='IFRAME' />
> <webctrl id='sn_form_inline_stream_entries' tag='DIV' />