Hi ,
I need to locate the Save button inside the span class. I am using selenium
web driver + java .
Please find the below mentioned code .
I tried the below code to locate the same but was not successful.
Any help would be highly appreciated.

1.
Thread.sleep(2001);
driver.findElement(By.xpath
("html/body/div[13]/div[3]/div/button[1])).click ;

Error message "Element is not currently visible and so may not be
interacted with"

Code:
div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<div class="ui-dialog-buttonset">
<button class="ui-button ui-widget ui-state-default ui-corner-all
ui-button-text-only ui-state-hover" type="button" role="button"
aria-disabled="false">
<span class="ui-button-text">Save</span>
</button>
<button class="ui-button ui-widget ui-state-default ui-corner-all
ui-button-text-only" type="button" role="button" aria-disabled="false">
<span class="ui-button-text">Cancel</span>
</button>
</div>
</div>
</div>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
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.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/1iLLxdYfxm8J.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Mike Riley at Nov 14, 2012 at 8:55 pm
    According to that error the element is not currently visible. Web Driver
    can only interact with an element as a user and a user can't click on what
    they do not see.

    Have you done whatever is needed to make the button visible?

    If you have, you probably just need to loop until it becomes visible and
    then try to click on it. Get rid of the sleep() and replace it with a loop
    (or a call to a function that loops). The function is best, since you
    probably have more places you need to do this, plus you should time it to
    make sure it appears within a reasonable amount of time or else report an
    error.

    Mike
    On Wednesday, November 14, 2012 4:30:46 AM UTC-8, Anuradha HR wrote:

    Hi ,
    I need to locate the Save button inside the span class. I am using
    selenium web driver + java .
    Please find the below mentioned code .
    I tried the below code to locate the same but was not successful.
    Any help would be highly appreciated.

    1.
    Thread.sleep(2001);
    driver.findElement(By.xpath
    ("html/body/div[13]/div[3]/div/button[1])).click ;

    Error message "Element is not currently visible and so may not be
    interacted with"

    Code:
    div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
    <div class="ui-dialog-buttonset">
    <button class="ui-button ui-widget ui-state-default ui-corner-all
    ui-button-text-only ui-state-hover" type="button" role="button"
    aria-disabled="false">
    <span class="ui-button-text">Save</span>
    </button>
    <button class="ui-button ui-widget ui-state-default ui-corner-all
    ui-button-text-only" type="button" role="button" aria-disabled="false">
    <span class="ui-button-text">Cancel</span>
    </button>
    </div>
    </div>
    </div>
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    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.
    To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/3T_lcSfhAQ4J.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedNov 14, '12 at 12:31p
activeNov 14, '12 at 8:55p
posts2
users2
websiteseleniumhq.org

2 users in discussion

Mike Riley: 1 post Anuradha HR: 1 post

People

Translate

site design / logo © 2022 Grokbase