question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I.Find or I.FindMultiple works only on items that are visible on the UI.

See original GitHub issue

I am working on a drop down that is non standard. It is a select with Chosen jQuery style applied to it. The jsfiddle has an example of the drop down i am working with. http://jsfiddle.net/mahwishs/w2KR4/

My goal is to select something from this drop down using the value.

So i tried to use the I.FindMultiple(“select#dropdown option[value=2]”)() I was hoping to see the value and the text property hydrated but no attributes are hydrated.

I was hoping to select the dropdown Item3 using the following code

 string value = "9";
 var hiddenSelect = I.FindMultiple("select#dropdown option")().ToList();
 for (int i = 1; i <= hiddenSelect.Count; i++)
        {
            if (hiddenSelect[i - 1].Value == value)
            {
                var chosenDropdown = I.Find(string.Format("#dropdown_chosen ul.chosen-results li[data-option-array-index={0}]", i - 1));
                I.Click(chosenDropdown);
            }
        }

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
stirnocommented, May 28, 2014

Somewhat reminiscent of the Konami Code, so at least theres that! 😃

1reaction
ghostcommented, May 28, 2014

OK, I’m not proud of this code, but it did work.

        I.Click("#PasswordQuestionId_chosen");
        I.Press("{DOWN}");
        I.Press("{DOWN}");
        I.Press("{DOWN}");  //Sigh.
        I.Press("{ENTER}");

It also has the advantage of being something actual users do. At least, actual users who are really lazy.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I select only visible elements using XPath?
Now it works for the first item but fails to recognize the same mapped item for the next time it is used in...
Read more >
Small guide to find multiple sentinel ships from single ...
Small guide to find multiple sentinel ships from single harmonic interface. · Use an echo locator and find a harmonic interface. · Unlock...
Read more >
Find Element and Find Elements in Selenium
What are find element and find elements method in Selenium? How to find different elements on a webpage using Selenium Webdriver?
Read more >
Find Children in UiPath - YouTube
This activity Retrieves a collection of children UI elements ... find children uipath youtube get attribute uipath uipath find multiple ...
Read more >
Different methods to locate UI Elements (WebElements) or ...
Let's take the example for Google, suppose we have to find/locate the search ... method instead of findElement to find multiple elements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found