{"id":21351699,"url":"https://github.com/softlr/selenium.webdriver.extensions","last_synced_at":"2025-07-12T20:31:56.616Z","repository":{"id":18376825,"uuid":"21557494","full_name":"Softlr/Selenium.WebDriver.Extensions","owner":"Softlr","description":"Extensions for Selenium WebDriver including jQuery/Sizzle selector support.","archived":false,"fork":false,"pushed_at":"2022-04-05T21:00:26.000Z","size":14582,"stargazers_count":49,"open_issues_count":1,"forks_count":10,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-11-22T03:09:24.767Z","etag":null,"topics":["jquery","selectors","selenium","selenium-webdriver","sizzle"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Softlr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T05:13:09.000Z","updated_at":"2023-04-12T18:40:23.000Z","dependencies_parsed_at":"2022-09-07T15:40:43.339Z","dependency_job_id":null,"html_url":"https://github.com/Softlr/Selenium.WebDriver.Extensions","commit_stats":null,"previous_names":["rayell/selenium-webdriver-extensions"],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softlr%2FSelenium.WebDriver.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softlr%2FSelenium.WebDriver.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softlr%2FSelenium.WebDriver.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Softlr%2FSelenium.WebDriver.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Softlr","download_url":"https://codeload.github.com/Softlr/Selenium.WebDriver.Extensions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225834369,"owners_count":17531470,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jquery","selectors","selenium","selenium-webdriver","sizzle"],"created_at":"2024-11-22T03:10:00.724Z","updated_at":"2024-11-22T03:10:01.534Z","avatar_url":"https://github.com/Softlr.png","language":"C#","readme":"![.NET](https://github.com/Softlr/Selenium.WebDriver.Extensions/actions/workflows/dotnet.yml/badge.svg)\n[![codecov](https://codecov.io/gh/Softlr/Selenium.WebDriver.Extensions/branch/develop/graph/badge.svg?token=LNpg4sX17h)](https://codecov.io/gh/Softlr/Selenium.WebDriver.Extensions)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=selenium.webdriver.extensions\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=selenium.webdriver.extensions)\n\n# Description\nExtensions for Selenium WebDriver including jQuery/Sizzle selector support.\n\n# Features\n## Main\n* Support for nested selectors\n* Easy setup: install NuGet package and start using it with your existing Selenium solution\n* High quality ensured by continuous integration setup with Appveyor, unit and integration tests and high code coverage\n* Well documented code using [GitBook](https://app.gitbook.com/@softlr/s/selenium-webdriver-extensions/)\n## jQuery/Sizzle support\n* jQuery/Sizzle selectors support for Selenium WebDriver\n* jQuery/Sizzle auto-load on pages on sites that don't use jQuery\n* Support for context switching\n* Support for `ExpectedConditions`\n* Support for Page Objects\n \n# Installation\nRun the following command in Visual Studio Package Manager Console.\n```posh\nInstall-Package Selenium.WebDriver.Extensions\n```\n\n# Documentation\nAPI documentation can be found on [GitBook](https://app.gitbook.com/@softlr/s/selenium-webdriver-extensions/) and user guide is on the [wiki](https://github.com/Softlr/Selenium.WebDriver.Extensions/wiki).\n\n# Usage\n\n#### Include extensions\nCreate alias for the extension `By` to be used.\n```csharp\nusing By = Selenium.WebDriver.Extensions.By;\n```\n\nIf you don't want to override the `By` to be used, you can always create `JQuerySelector` and `SizzleSelector` instances with `new` keyword.\n\n#### Basic jQuery example\nInvoke jQuery selectors on the WebDriver.\n```csharp\ndriver.FindElements(By.JQuerySelector(\"input:visible\"))\n```\n\n#### jQuery Traversing methods\nYou can also chain jQuery traversing methods.\n```csharp\nvar selector = By.JQuerySelector(\"div.myclass\").Parents(\".someClass\").NextAll();\ndriver.FindElement(selector);\n```\n\n#### jQuery loading\nIf the site that you are testing with Selenium does not include jQuery this extension will automatically load the 3.5.1 version when you run any of the `Find*` methods. If you want you can choose to load a different version of jQuery. The library uses jQuery CDN by default, but if you want to use a completely different source, that's also supported\n\n```csharp\ndriver.LoadJQuery(\"1.11.0\"); // load specific version from default CDN\ndriver.LoadJQuery(new Uri(\"https://some.server/jquery.js\")); // load a library from other source\n```\n\n#### jQuery variable name\nWhen you create a jQuery selector using `By` helper class the resulting selector will use `jQuery` as library variable name. If you site is using a different variable name for this purpose you can pass this value as an optional parameter.\n\n```csharp\nvar selector = By.JQuerySelector(\"div\", jQueryVariable: \"myJQuery\");\n```\n\n#### jQuery context switch\nYou can use one `JQuerySelector` instance as a context of another `JQuerySelector`.\n\n```csharp\nvar context = By.JQuerySelector(\"div.myClass\");\nvar selector = By.JQuerySelector(\"ol li\", context);\ndriver.FindElements(selector);\n```\n\n#### Basic Sizzle example\nInvoke Sizzle selectors on the WebDriver.\n```csharp\ndriver.FindElements(By.SizzleSelector(\"input:visible\"))\n```\n\n#### Sizzle loading\nIf the site that you are testing with Selenium does not include Sizzle this extension will automatically load the 2.0.0 version when you run any of the `Find*` methods. If you want you can choose to load a different version of Sizzle. The library used CloudFlare CDN by default, but if you want to use a completely different source, that's also supported\n\n```csharp\ndriver.LoadSizzle(\"1.11.1\"); // load specific version from default CDN\ndriver.LoadSizzle(new Uri(\"https://some.server/sizzle.js\")); // load a library from other source\n```\n\n#### Sizzle context switch\nYou can use one `SizzleSelector` instance as a context of another `SizzleSelector`. Contrary to jQuery equivalent of this method, only first element from the context is used. This is because it's a limitation of Sizzle.\n\n```csharp\nvar context = By.SizzleSelector(\"div.myClass\");\nvar selector = By.SizzleSelector(\"ol li\", context);\ndriver.FindElements(selector);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlr%2Fselenium.webdriver.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftlr%2Fselenium.webdriver.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftlr%2Fselenium.webdriver.extensions/lists"}