Hi, I am passing variable as SearchText = “Studies”
My dynamic xpath is Xpath=//one-app-launcher-menu-item/a//p/b[text()=’${SearchText}’]
which is not working.
If i give hardcoded xpath as xpath as //one-app-launcher-menu-item/a//p/b[text()=‘Studies’] which is working.
while passing the variable in Searchtext , the xpath is not able to searched and give error as "Unable to find the element located by ‘By.xpath: //one-app-launcher-menu-item/a//p/b[text()=’${SearchText}’]’. Please recheck the objects properties to make sure the desired element is located. "
Please let me know if i am missing anything and how to dynamically pass the variable.
Thanks!!