Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

9
  • it's not waiting for the element to appear. Commented Nov 19, 2013 at 17:28
  • Are you sure that item is what you want to return? When I've written code like this, what I wanted would be what is named element in your code. Commented Nov 19, 2013 at 17:41
  • I tried that didn't work either. Commented Nov 19, 2013 at 17:49
  • Do you definitely only have one item of that ID in the DOM? Also, if you debug the code, does element get found? Commented Nov 19, 2013 at 17:58
  • Well how do you know it doesn't wait? Have you set a breakpoint and debugged it? The code looks fine, I really don't believe it "isn't working" by "not waiting". Does it throw a timeout exception? If so when? After how long? Why are you returning the same string that you are passing in? That makes no sense. Commented Nov 19, 2013 at 18:59