Assigning variable to selector


Can someone please help me with the selector issue I’m facing. I’m not able to us my variable CompanyCode in aaname. What i’m missing in the syntax here. also the quotes get replaced with &quotes.

syntax - aaname=’ " + CompanyCode + " * ’ parentclass=‘ui-menu-item’ />"


Hi Nikhil,

Enter your selector as a string in Selector section.

Copy your above selector in notepad.
Put “” in selector .Click in middle pane.
Click on … button of selector, put above selector in between “”.Check if you can access your variable i.e Companycode.
Click on OK.

Hope so this will help you.




Paste the below selector in the selector Property and try again
"<html htmlwindowname='_ga' title='Requisition:Setup' /><webctrl id='ui-id-*' aaname='"+CompanyCode.ToString()+"' parentclass='ui-menu-item' />"