<div class="MuiGrid-root jss45 MuiGrid-item MuiGrid-grid-xs-12 MuiGrid-grid-sm-3 MuiGrid-grid-md-3 MuiGrid-grid-lg-3 MuiGrid-grid-xl-3">
<h4 class="MuiTypography-root jss48 MuiTypography-h4">Decks</h4>
<button class="MuiButtonBase-root MuiFab-root jss47 MuiFab-sizeSmall MuiFab-primary" tabindex="0" type="button" aria-label="add" title="Add">
<span class="MuiFab-label"><svg class="MuiSvgIcon-root" focusable="false" viewBox="0 0 24 24" aria-hidden="true">
<path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z">
</path>
</svg>
</span>
<span class="MuiTouchRipple-root">
</span>
</button>
</div
Java Scriprt:
describe('Login', function () {
it('Login', function () {
browser.waitForAngularEnabled(false);// since it is React JS application
browser.get('http............');// cannot access this. since it requires vpn
element(by.css('input[type="text"]')).sendKeys('Username');
element(by.css('input[type="password"]')).sendKeys('Password');
element(by.buttonText('Login')).click();
element(by.css('svg[class="MuiSvgIcon-root"]')).click();
});
});
In the above code, I wanted to click on the add button. I tried with all locators. But I am getting element not found error. Can anyone please help me in resolving this