I want to retrieve the value for our version which is stored in HTML DOM.
Using node.js and protractor. I don't know how to go about it.
Please provide your valuable knowledge for the same :)
I want the value 2016.R08.1.RC1
I want to retrieve the value for our version which is stored in HTML DOM.
Using node.js and protractor. I don't know how to go about it.
Please provide your valuable knowledge for the same :)
I want the value 2016.R08.1.RC1
The simplest way is to select html
by selector and get manifest
property:
element(by.css('html')).getAttribute('manifest');
Then you should receive the full value of manifest
property.
I've just come through this question and it's answer while doing protractor e2e angular 5/6 tests.
The answer from @Konstantin Azizov is good but element(by.css('html')).getAttribute('manifest')
will return a promise not the value itself indicated by it's API:
So you can do something like:
element(by.css('html')).getAttribute('manifest').then((data) => {
elementHtmlValue = data;
});
The content then of elementHtmlValue
is what you are looking for :)