0

If I hard code something into the conatins it works just fine

valstring = "[contains(title,'Test')]";

However if I try and use contains against the xpath title and then use what was entered into a text box I haven't figured out how to do that. I'm sure it's something very simple

valstring = "[contains(title, txtSearchVal)]";

Any Suggestions would be greatly appriciated

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by ZMike
0

Depending on your language, could you use something like this?:

valstring = "[contains(title, " + txtSearchVal + ")]";

Edited by thines01: formatting

0

thines01,

Thank you very much. You were very close. Here is what ended up working for me

valstring = "[contains(title, "+ "'" + txtSearchval + "'" +")]";

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.