FAQ
I have the problem with web 2.0 pages, full of Jqueries and so ...

The workaround I use : webElement.sendKeys(Keys.ENTER); (or SPACE with
chekboxes).

I still want to know why .click() is not working on these cases :))

Le vendredi 6 janvier 2012 23:31:25 UTC+1, Chris Rudram a écrit :
I have, as part of my code the following :

// Use the driver to get the Login
def loginPage = server + "activity-management-ui/login/auth"
driver.get(loginPage)
driver.findElement(By.id("username"))
assert driver.getTitle() == "Login"

// Assert succeeds, confirmed I have the correct page

// Enter User name and password and click log in
driver.findElement(By.id("username")).sendKeys(username)
driver.findElement(By.id("password")).sendKeys(password)
driver.findElement(By.id("sign-in")).click()

The click does not seem to click the button at all. I have
implemented the WebDriverEventListener class to log the before and
after click actions, and can check that the element is found, and is
of the correct type. The click however doesn't submit the log in page
and log into the application. The HTML looks like :

<form class="test" action="/activity-management-ui/
j_spring_security_check" method="post">
<div class="clearfix">
<div class="clearfix">
<label for="password">Password</label>
<div class="input">
<input id="password" type="password" name="j_password">
<input id="sign-in" class="btn blue" type="submit" value="Sign In">
</div>
</div>

The before and after click show I am on the element I expect (the
submit), but the driver appears to go nowhere. This is not the only
page I am having trouble with the click() function not triggering the
web page to do something. Other pages also show the click() -
sometimes- not working. I spect some time checking that I have the
correct element, and that the element is active and available, but
still the click() does not always trigger a new page to open as
expected.

The system under test is a javascript based set of web pages using
ExtJS as the framework.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/5oALyT05vnQJ.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en-US.

Search Discussions

  • Nishant Mehta at Dec 24, 2013 at 6:00 am
    I am still facing this issue unable to click even if the element is
    selected which i have verified by printing out the text of the button .Has
    anyone able to solve this i am using selenium 2.39.0??

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/bd9f6157-e66a-4e66-9b88-26f7b23d5093%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Ramaguru N at Dec 24, 2013 at 6:14 am
    did you try the element with CSS selector??

    Regards,
    Ramaguru N

    On Mon, Dec 23, 2013 at 5:27 PM, Nishant Mehta wrote:

    I am still facing this issue unable to click even if the element is
    selected which i have verified by printing out the text of the button .Has
    anyone able to solve this i am using selenium 2.39.0??

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/bd9f6157-e66a-4e66-9b88-26f7b23d5093%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CA%2BHYZ3HULa4KDRng5ndjOqqR%2BcywSUuqDHmBCizjSdDms-NN9w%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nani.thrinath.info at Dec 25, 2013 at 4:51 pm
    *Try with CSS selector.*

    Thrinath

    On Tue, Dec 24, 2013 at 11:43 AM, Ramaguru N wrote:

    did you try the element with CSS selector??

    Regards,
    Ramaguru N

    On Mon, Dec 23, 2013 at 5:27 PM, Nishant Mehta wrote:

    I am still facing this issue unable to click even if the element is
    selected which i have verified by printing out the text of the button .Has
    anyone able to solve this i am using selenium 2.39.0??

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/bd9f6157-e66a-4e66-9b88-26f7b23d5093%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/CA%2BHYZ3HULa4KDRng5ndjOqqR%2BcywSUuqDHmBCizjSdDms-NN9w%40mail.gmail.com
    .

    For more options, visit https://groups.google.com/groups/opt_out.
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CACy7ZuGM%3D%3DwMRqN4PUYaTOv_G6ijYV7J8Y%3D%3DvYca-b8PcuzcjQ%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedJul 6, '12 at 9:55a
activeDec 25, '13 at 4:51p
posts4
users4
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase