I want to do mouseover function over Tooltip, which displays meessage.
Here is the link to video - https://screenrec.com/share/5IWTd4a7i9
For some reason hover does not happen due to which I do not get the text and test fails
This is what I have tried
browser.actions()
.mouseMove(
element(by.xpath('/html/body/app-root/div/main/ng-component/ngb-tabset/div/div/view-concepts-tab/div[1]/concept-view/div/dl/mat-accordion/mat-expansion-panel/div/div/div[4]/term-view/div/div[3]/div[1]/dl/mat-accordion/mat-expansion-panel/mat-expansion-panel-header/span[1]/mat-panel-description/dd/span')))
.click()
.perform();
text('On mouse hover')
Also tried
expect(element.all(by.xpath('/html/body/app-root/div/main/ng-component/ngb-tabset/div/div/view-concepts-tab/div/concept-view/div/dl/mat-accordion/mat-expansion-panel/div/div/div[2]/term-view/div/div[3]/div[1]/dl/mat-accordion/mat-expansion-panel/mat-expansion-panel-header/span[1]/mat-panel-description/dd/span'))).toEqual('On mouse hover');
EDIT
I got some success with below code, however error is Expected [ ] to equal 'On mouse hover'.
expect(element.all(by.css('dd#A>span'))).toEqual('On mouse hover');
You have to use atribute value of title then you will get the tooltip text. you dont have to scroll to the element.
expect(element(By.id("xyz")).getAttribute("title")).ToBe("Tool tip text");