How to do a mouse over using selenium webdriver to see the hidden menu without performing any mouse clicks?

后端 未结 4 609
轮回少年
轮回少年 2021-02-02 11:56

How to do a mouse hover/over using selenium webdriver to see the hidden menu without performing any mouse clicks?

There is a hidden menu on website which i am testing th

4条回答
  •  死守一世寂寞
    2021-02-02 12:13

    yeah the question you posted is about tool tip

    perform mouse hover the then capture its attribute value

    closely observe your HTML code manually move your mouse pointer on the element & observe in which attribute value your hidden text present

    Actions builder = new Actions(driver)
    builder.MoveToElement(driver.FindElement(By.Id("Content_AdvertiserMenu1_LeadsBtn")))
           .Click().Build().Perform();
    
    
    String value=driver.FindElement(By.Id("Content_AdvertiserMenu1_LeadsBtn")).getAttribute("attribute value in which hidden text presents");
    

提交回复
热议问题