Invalid selector found exception

Hi,

I am about to implement browser variable using attach browser

This is the actual selector when i indicated element using attach browser activity

“<html title=Case: 001221 ~ Salesforce - Unlimited Edition />”

now to make dynamic i am passing case number in the selector in the below format

“<html title='Case: '”+CaseNumber+"’ ~ Salesforce - Unlimited Edition’ />"

but throws error as “The selector is not valid”

Is there any rule we will not able to give dynamic selector in attach browser or could you please throw some light on this?

Thanks,
Ulaga

"<html title='Case: '"+CaseNumber.ToString()+"' ~ Salesforce - Unlimited Edition' />"

Try this one

I have retried with tostring also but it does not work and moreover the variable casenumber itself is string variable. It throws invalid selector exception

HI @Ula,

Try this

"<html title='Case: "+CaseNumber.ToString()+" ~ Salesforce - Unlimited Edition' />"

don’t use single quotes before and after in CaseNumber

3 Likes

@akila93. Thank you very much. Yes, it is working now. What could be the issue. My syntax was correct know?

yes but you should not use single quotes apart from that its correct @Ula

@akila93 Ok. Thank you.