Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Click not working on header link for drop down in footer

View previous topic View next topic Go down

Click not working on header link for drop down in footer

Post by rodale_janet on Wed May 28, 2014 8:43 pm

I am trying to test a footer that has a topic link which produces a drop down of links.   The click for the topic is not working so the drop down links never become visible.  I have tried, finding the element by xpath, linkText and using the Javascript executor.   All find the item but never click to open the drop down or the click is not functioning.  I have added waits of three and five seconds but still it is not working.  Posting the code below:



  </div>
    <footer id="footer" class="region region-footer">
    <div id="block-menu-menu-footer" class="block block-menu first odd" role="navigation">

      
  <ul class="menu"><li class="menu__item is-expanded first expanded"><a href="/" class="menu__link footer-toggle bold active">Categories</a><ul class="menu"><li class="menu__item is-leaf first leaf"><a href="http://www.bicycling.com" class="menu__link">Home</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/news" class="menu__link">News</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/training-nutrition" class="menu__link">Training &amp; Nutrition</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/bikes-gear" class="menu__link">Bikes &amp; Gear</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/maintenance" class="menu__link">Repair</a></li>
<li class="menu__item is-leaf leaf"><a href="http://bicycling.allsportgps.com/Bicycling/Home.aspx" class="menu__link">Rides</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/2013-tour-de-france" class="menu__link">Tour de France</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/mountainbikecom" class="menu__link">Mountainbike.com</a></li>
<li class="menu__item is-leaf last leaf"><a href="http://www.bicycling.com/gear" class="menu__link">Gear Finder</a></li>
</ul></li>
<li class="menu__item is-expanded expanded"><a href="/" class="menu__link bold active">Services</a><ul class="menu"><li class="menu__item is-leaf first leaf"><a href="http://www.bicycling.com/eventfinder" class="menu__link">Events</a></li>
<li class="menu__item is-leaf leaf"><a href="http://forums.bicycling.com/" class="menu__link">Forum</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/subfooter" class="menu__link">Subscriptions</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/giftfooter" class="menu__link">Gift Subscriptions</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/newsletter/main" class="menu__link">Newsletter</a></li>
<li class="menu__item is-leaf leaf"><a href="http://shop.bicycling.com/webapp/wcs/stores/servlet/StoreCatalogDisplay?langId=-1&amp;catalogId=10007&amp;storeId=10056" class="menu__link">Shop</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/feature/rss.xml" class="menu__link">RSS</a></li>
<li class="menu__item is-leaf last leaf"><a href="http://www.bicycling.com/store_finder" class="menu__link">Shop Finder</a></li>
</ul></li>
<li class="menu__item is-expanded expanded"><a href="/" class="menu__link bold active">Help</a><ul class="menu"><li class="menu__item is-leaf first leaf"><a href="http://www.bicycling.com/contact-us" target="_blank" class="menu__link">Contact Us</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/customer_service" class="menu__link">Customer Service</a></li>
<li class="menu__item is-leaf leaf"><a href="http://preferences.rodale.com/" class="menu__link">Manage Email Preferences</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodaleinc.com/content/copyright" class="menu__link">Copyright Notice</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/about-bicycling" class="menu__link">About Bicycling</a></li>
<li class="menu__item is-leaf last leaf"><a href="http://www.bicycling.com/sitemap.xml" class="menu__link">Site Map</a></li>
</ul></li>
<li class="menu__item is-expanded expanded"><a href="/" class="menu__link bold active">Corporate</a><ul class="menu"><li class="menu__item is-leaf first leaf"><a href="http://www.bicycling.com/advertising" class="menu__link">Advertise</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/node/4854" class="menu__link">Bicycling Media Kits</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.bicycling.com/retailsub" class="menu__link">Retailer Program</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodaleinc.com/content/amazon-affiliate-terms" target="_blank" class="menu__link">Amazon Affiliate</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodaleinc.com/" class="menu__link">Rodale Inc.</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodale.com/corp/sub/0,,1-28,00.html" class="menu__link">Your Privacy Policy</a></li>
<li class="menu__item is-leaf last leaf"><a href="http://www.rodaleinc.com/content/rodale-inc-website-application-and-social-media-terms-use" class="menu__link">Community Terms of Use</a></li>
</ul></li>
<li class="menu__item is-expanded last expanded"><a href="/" class="menu__link bold active">Rodale Sites</a><ul class="menu"><li class="menu__item is-leaf first leaf"><a href="http://www.runnersworld.com/" target="_blank" class="menu__link">Runner's World</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.runningtimes.com/" target="_blank" class="menu__link">Running Times</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.womenshealthmag.com/" target="_blank" class="menu__link">Women's Health</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.prevention.com/" target="_blank" class="menu__link">Prevention</a></li>
<li class="menu__item is-leaf leaf"><a href="http://menshealth.com/" target="_blank" class="menu__link">Men's Health</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.organicgardening.com/" target="_blank" class="menu__link">Organic Gardening</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodalenews.com/" target="_blank" class="menu__link">Rodale News</a></li>
<li class="menu__item is-leaf leaf"><a href="http://www.rodales.com/" target="_blank" class="menu__link">Rodale's</a></li>
<li class="menu__item is-leaf last leaf"><a href="http://www.fitbie.com/" target="_blank" class="menu__link">Fitbie.com</a></li>
</ul></li>
</ul>
</div>

rodale_janet
Active particpant
Active particpant

Posts : 10
Join date : 2014-03-07

Back to top Go down

Re: Click not working on header link for drop down in footer

Post by rodale_janet on Wed May 28, 2014 8:45 pm

Here is the java code.  Obviously the above is the HTML:

Code:

WebElement mainLink;

mainLink = driver.findElement(By.linkText("Categories"));
   mainLink.click();
   wait_fiveSeconds();

rodale_janet
Active particpant
Active particpant

Posts : 10
Join date : 2014-03-07

Back to top Go down

Re: Click not working on header link for drop down in footer

Post by Paps_engineer on Fri Oct 10, 2014 6:21 pm

hi,
we can do this by click one by one.
First step: take a corresponding xpath or relative xpath and then click it that dropdown will open.(driver.findElement(By.xpath("")).click()Wink
Second step: what element want to click for that take xpath use it in your code.
I had the same problem, I did the same way.

Thanks,
Papaiadasan.S,
Automation COE,
Indium Software India Limited.
(indiumsoft.com/core-qa-offerings/test-automation)

http://www.indiumsoft.com/core-qa-offerings/test-automation" title="Test Automation">Test Automation

Paps_engineer
Active particpant
Active particpant

Posts : 10
Join date : 2014-07-24

Back to top Go down

Re: Click not working on header link for drop down in footer

Post by Sponsored content Today at 7:14 pm


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