In
Create Network Container
-
It works by cutting and pasting your posted example. Your original source probably has tabs or other whitespace characters that don't match. Here are some alternatives:
1) Normalize spaces
//td[normalize-space(text()) = 'Create Network Container']
2) Compare using string value of td
(this will also match Create Network Container
)
//td[normalize-space(.) = 'Create Network Container']
3) Check for each word separately (ignores word order)
//td[contains(text(), 'Create') and contains(text(), 'Network') and contains(text(), 'Container')]
4) Strip whitespace, tabs, newlines, line-feeds, carriage returns and compare result:
//td[translate(text(), "
", "") = 'CreateNetworkContainer']
- 热议问题