I want to stimulate a situation when I want to click on an element but this element is hidden by another element.
I want to get an error because the correct element is hidden
How do I do it?
Thanks

--
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/6e603995-0daf-4c48-9ad3-9eb6bc35c806%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Rajeev Prabhakaran Nair at Dec 15, 2014 at 1:08 am
    Hidden elements are not possible to invoke through driver. You can use
    JavaScript executor to invoke hidden element. But that is not good practise
    from the user point of view as well as it will create compatibility issues.
    So try to get the exact flow, and analyse when the element is being enabled.

    For Javascript executor Google it, you will get lots of implementation
    according to your requirement.

    Regards / Rajeev
    On Saturday, 13 December 2014 04:31:47 UTC+5:30, retner retner wrote:

    I want to stimulate a situation when I want to click on an element but
    this element is hidden by another element.
    I want to get an error because the correct element is hidden
    How do I do it?
    Thanks
    --
    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/2874e6c3-723c-4ea0-8091-96befdbb4f9c%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Http://thebuddhatree.com/ at Dec 15, 2014 at 8:06 am
    One solution is run a findElements operation on hidden element, if it
    returns zero run error code else run your intended code.

    Sample code could be something like -
      if (driver.findElements(By.xpath(xPath)).size() == 0) {
            error code
      }else {
            other code
      }
    On Saturday, December 13, 2014 4:31:47 AM UTC+5:30, retner retner wrote:

    I want to stimulate a situation when I want to click on an element but
    this element is hidden by another element.
    I want to get an error because the correct element is hidden
    How do I do it?
    Thanks
    --
    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/1fb218f5-3297-4313-bf69-42f2c440a76d%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Retner retner at Dec 15, 2014 at 9:07 am
    Hi
    Thanks you all on the reponse
    But the element isnt hidden in the DOM
    Only hidden by another element (if i click it with the driver it eill be
    sucess)
    But I need how to know if its hidden(GUI)
    On Saturday, December 13, 2014 1:01:47 AM UTC+2, retner retner wrote:

    I want to stimulate a situation when I want to click on an element but
    this element is hidden by another element.
    I want to get an error because the correct element is hidden
    How do I do it?
    Thanks
    --
    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/bf97cc6f-4332-43ec-b08c-a6530b86ef68%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedDec 12, '14 at 11:01p
activeDec 15, '14 at 9:07a
posts4
users3
websiteseleniumhq.org

People

Translate

site design / logo © 2021 Grokbase