Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

selector "input#js-login-username:visible" caused exception #6

Open
fschwiet opened this issue Mar 13, 2013 · 1 comment
Open

selector "input#js-login-username:visible" caused exception #6

fschwiet opened this issue Mar 13, 2013 · 1 comment

Comments

@fschwiet
Copy link
Owner

The following code:

browser.WaitForElement(BySizzle.CssSelector("input#js-login-username:visible")).ClearThenSendKeys(Account.Username);

Failed, when I removed ":visible" it worked. Exception was:

Exception encountered:
OpenQA.Selenium.WebDriverException: Unexpected error. Syntax error, unrecognized expression: visible
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary2 parameters) at OpenQA.Selenium.Remote.RemoteWebDriver.ExecuteScriptInternal(String script, Boolean async, Object[] args) at SizSelCsZzz.Other.ByExternalScript.FindElements(ISearchContext context) in c:\src\SizSelCsZzz\SizSelCsZzz\Other\ByExternalScript.cs:line 35 at SizSelCsZzz.Other.ByExternalScript.FindElement(ISearchContext context) in c:\src\SizSelCsZzz\SizSelCsZzz\Other\ByExternalScript.cs:line 47 at SizSelCsZzz.WebDriverExtensions.WaitForElementEx(ISearchContext node, By condition, Nullable1 maxWaitMS, Nullable`1 waitIntervalMS) in c:\src\SizSelCsZzz\SizSelCsZzz\WebDriverExtensions.cs:line 39
at SizSelCsZzz.WebDriverExtensions.WaitForElement(ISearchContext node, By condition) in c:\src\SizSelCsZzz\SizSelCsZzz\WebDriverExtensions.cs:line 16

@fschwiet
Copy link
Owner Author

The reason this didn't work is because BySizzle doesn't support :visible, but JQuery does. Not sure if there is a better way to deal with this... Maybe BySizzle should be deprecated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant