Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Unable to click menu with Link attribute

View previous topic View next topic Go down

Unable to click menu with Link attribute

Post by cerberus on Tue Aug 18, 2015 6:14 pm

Hi,

I am new to Selenium webdriver. My website has a Menu button with sub menus. The sub menu buttons can be accessed by either hovering over the Menu button or by clicking it. I have tried every combination but haven't been successful as of now.The source code is:

Code:
div class="divAPOAppMenu">
<ul id="projectDashboardMenu" class="sf-menu sf-js-enabled sf-arrows">
   <li>
   <li class="">
   <a class="sf-with-ul" href="#">Manage Assessment</a>
   <ul style="display: none;">
   <li>
       <a id="btnAddAssessment">
       <img style="height: 20px; width: 20px; float: left; margin-right: 5px; border: none;" src="../../Images/AddIcons.png" alt="">
       New Assessment
       </a>
       </li>


I am trying to click the sub menu with the text "New Assessment" using the.  :
Code:
Actions action=new Actions(driver);
WebElement moveToManageAssessmnt = driver.findElement(By.linkText("Manage Assessment"));
action.moveToElement(moveToManageAssessmnt).moveToElement(driver.findElement(By.linkText("New Assessment"))).click().perform();

This is throwing error.Can someone please suggest me how to click the sub menu button?? Any sort of help will be highly appreciated!! Thanks in advance !!!

cerberus

Posts : 1
Join date : 2015-06-24

Back to top Go down

Re: Unable to click menu with Link attribute

Post by AgoBalan on Thu Aug 20, 2015 6:04 pm

what error it throws..? in which step.. plz be specifc

AgoBalan
Amateur
Amateur

Posts : 36
Join date : 2015-02-23

Back to top Go down

Re: Unable to click menu with Link attribute

Post by anemuday on Sat Aug 29, 2015 2:49 pm

Please watch this video for clear demonstration of how to mouse hover on a webelement.


anemuday
Active particpant
Active particpant

Posts : 11
Join date : 2012-10-11

Back to top Go down

Re: Unable to click menu with Link attribute

Post by Sponsored content Today at 1:07 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum