Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

Add Waiter Patch For .net bing. Code Convert from Java #1142

Closed
lukeis opened this issue Mar 2, 2016 · 6 comments
Closed

Add Waiter Patch For .net bing. Code Convert from Java #1142

lukeis opened this issue Mar 2, 2016 · 6 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 2, 2016

Originally reported on Google Code with ID 1142

namespace OpenQA.Selenium.Support.UI

Reported by binken.zou on 2010-12-24 03:11:45


- _Attachment: [Waiter.patch](https://storage.googleapis.com/google-code-attachments/selenium/issue-1142/comment-0/Waiter.patch)_ - _Attachment: [WebDriver.Support.Project.patch](https://storage.googleapis.com/google-code-attachments/selenium/issue-1142/comment-0/WebDriver.Support.Project.patch)_
@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Should these two files be one patch?

Reported by theautomatedtester on 2010-12-26 12:55:28

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

One for the C# project file, the others are the cs files? And there ara located in different
location

Reported by binken.zou on 2010-12-26 12:58:04

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by dawagner on 2011-01-03 15:14:21

  • Status changed: Accepted

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

I've reworked the Wait classes to be more C#-like (using System.Funcs rather than a
custom function implementation, so lambdas and delegates can be used), added it as
revision 10830.

I'm not sure whether it's worth adding the syntactic sugar of ElementPresent.  Currently,
you would wait by calling:

var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3))
var element = wait.until(driver => driver.FindElement(By.Name("q")));

Attached is a patch which would let you call:

var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3))
var element = wait.until(Element.IsPresent(By.Name("q")));

I don't think it's worth adding to the API, and I don't love it because the Is in the
name implies that it returns a bool, but I'm willing to be swayed.

Reported by dawagner on 2011-01-04 01:35:41

  • Status changed: Fixed

- _Attachment: [elementpresent.diff](https://storage.googleapis.com/google-code-attachments/selenium/issue-1142/comment-4/elementpresent.diff)_

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Thanks for your comment!

Reported by binken.zou on 2011-01-04 02:31:19

@lukeis
Copy link
Member Author

lukeis commented Mar 2, 2016

Reported by luke.semerau on 2015-09-17 18:11:49

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 2, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant