Is there a way to verify if the element I've selected by its id
has the expected text content?
var driver = require('selenium-webdriver');
var By = driver.By;
var elem = this.driver.findElement(By.id('my_id'));
assert.equal(elem.getText(), 'blablabla');
Unfortunately, the above code is not working as expected:
AssertionError: ManagedPromise {
flow_:
ControlFlow {
propagateUnhandledRejections_: true,
activeQueue_:
TaskQueue {
== 'blablabla'
I'm unable to find an example demonstrating how to perform this straightforward validation.