SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6
  1. #1
    Apprentice
    Join Date
    Feb 2012
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Button.click for Interenet Explorer

    Hi guys,
    I have a problem when clicking on a button using IE 9 !
    Basically, i just need to do this:

    WebElement submit = driver.findElement( By.xpath( "//button[@class='gwt-Button']" ) );
    submit.click();

    It works in FF but fails in IE

  2. #2
    Super Member QAGanesh's Avatar
    Join Date
    Sep 2010
    Posts
    1,898
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Button.click for Interenet Explorer

    WebElement submit = driver.findElement(By.xpath( "//button[@class='gwt-Button']"));
    submit.click();

    Try to click on someother element on page and then try the above code. This ensures that the browser gets the control & focus.
    Thanks,
    Ganesh Iyer
    Winds of Change

  3. #3
    Apprentice
    Join Date
    Feb 2012
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Button.click for Interenet Explorer

    i do that. enter some text in the username and password textbox. Also, if i try to get the caption of the button it works ( so the xPath is correct) but fails for click action :-(

  4. #4
    Member
    Join Date
    Sep 2010
    Location
    TN, India
    Posts
    377
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Button.click for Interenet Explorer

    Check the source code from IE. Is the same structure shown in FF?
    Also try using CSS like, button.gwt-Button
    If not works, then try to fire some events like onFocus

    Thanks...
    Thank/Like to help others if my input helped you !!!
    I am speaking for myself, not for my employer nor any one.
    Automation Ecstasy

  5. #5
    Apprentice
    Join Date
    Feb 2012
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Button.click for Interenet Explorer

    i solved the problem by changing the "submit.Click " with "submit.sendKeys(enter). For some reason the click is not recognized :-(

    Another problem i see with using the .click in IE9 is with a tabbed object. I try to hover or click on a tab but nothing happens
    The code is like:

    HOVER ->hoverAction.moveToElement(driver.findElemen t( By.xpath( "//*[@id='gwt-uid-65']" ))).build().perform();

    CLICK->driver.findElement( By.xpath( "//*[@id='gwt-uid-69']" )).click

    No errors are reported

  6. #6
    Apprentice
    Join Date
    Feb 2012
    Posts
    34
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Button.click for Interenet Explorer

    Ah shame on me :-)
    The problems related to the .click and hover actions with IE were related to the browser's zoom level. By setting it to 100% it works ;-)

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 11:42 AM.

Copyright BetaSoft Inc.