browser.useXpath.waitForElementVisible()
seems to have problems with (class-)names containing whitespaces. My full classname is jstree-anchor jstree-clicked
.
The following commands succeed:
browser.useXpath()
.waitForElementVisible('//a[contains(@class, "jstree-anchor")][text()="' + name + '"]', 5000)
.waitForElementVisible('//a[contains(@class, "jstree-clicked")][text()="' + name + '"]', 5000);
But these fail:
browser.useXpath()
.waitForElementVisible('//a[contains(@class, "jstree-anchor jstree-clicked")][text()="' + name + '"]', 5000);
browser.useXpath()
.waitForElementVisible('//a[@class="jstree-anchor jstree-clicked"][text()="' + name + '"]', 5000);
How do I handle such elements when I do have to check for the full class name?