Could not hover over Bar Graph icon. | Selenium Webdriver Tutorial with c# |Selenium C# training
20% Festival Month Offer Avail now

Selenium C# Training Forum

Could not hover over Bar Graph icon.

Vrushali Haldankar Post on 11/06/2019

Dear Team,

# MY script could not hover over  Bar Graph .. so cannot view Overlay Matrix.

# I am getting the element of Bar Graph.. so test step is PASS .. (there is no exception like NoSuchElementException, ElementNotClickableException)

# but webdriver code could not hover over Bar could not capture next element.

# I am struggling for 2 weeks.

# Project  UI Developer also tried by adding new attribute value.. but that also not work

 # Kindly suggest any other code for hover over

 # Or is there any UI property changes my code can hover over Bar Graph.


when i hover over Bar Graph icon.. cannot view 'Overlay Matrics'

Approach 1

Point point = m_page.Maint_Overlay.Location;
int xcord = point.X;
int ycord = point.Y;
Console.WriteLine(xcord + " " + ycord);
Actions act = new Actions(driver);


Approach 2

IJavaScriptExecutor js;
js = driver as IJavaScriptExecutor;
js.ExecuteScript("arguments[0].click();", m_page.Maint_Overlay);




Ashish Reply on 12/06/2019

Can you tell me what is the exact scenario.


From the code as seen on the two lines below, 


I can understand that you have a element m_page.Maint_Overlay, and on this element you are performing a incomplete action click and hold. After click and hold you need to add some other action as well. For example .movebyoffset . for the action to be complete.