I have two input text boxes and one label on my page. I want to get the numbers from all three elements, add the two text box numbers together, then check if the sum equals the label. How would I go about this?
This is what I have so far, but it's not been working for me. It seems that getAttribute returns a value with apostrophes around the number. If I try to use "parseInt" it returns "NaN"
element(by.id('textbox1')).getAttribute('value').then(function(value){
textbox1value = value;
});
element(by.id('textbox2')).getAttribute('value').then(function(value){
textbox2value = value;
});
element(by.id('label1')).getText().then(function(value){
label1value = value;
});
expect(textbox1value + textbox2value).toEqual(label1value);