The LinqWebElement class extends the WebElement class and provides additional functionalities for interacting with web elements using LINQ expressions. It encapsulates an IWebElement object and enhances it with convenient methods and properties.
- webElement: The underlying IWebElement object to encapsulate.
- parentDriver: The parent driver associated with the web element.
- id: The unique identifier of the web element.
Gets or sets the ID attribute of the web element.
Gets or sets the class attribute of the web element.
Gets or sets the inline style attribute of the web element.
Gets the parent web element of the current web element as a LinqWebElement object.
Gets the child web elements of the current web element as an enumerable collection of LinqWebElement objects.
Gets the sibling web elements of the current web element as an enumerable collection of LinqWebElement objects.
The Attributes property provides a dictionary of attributes and their values for the web element. The dictionary contains the attribute names as keys and their corresponding values as values.
Deletes the current web element.
Sets the value of the specified attribute for the web element.
- attribute: The name of the attribute.
- value: The value to set for the attribute.
Checks if the web element has the specified attribute.
- attribute: The name of the attribute to check.
Sets the text content of the web element.
- text: The text to set.
Appends the specified HTML content to the web element.
- html: The HTML content to append.
This project is licensed under the MIT License - see the LICENSE.md file for details.
Visit https://scrapeweb.site
Or join the Web Scraping and Automation community on Discord: https://discord.gg/f3EfBQamnT
The extensions provided by this library are subject to the reliability of the Selenium WebDriver and the browser being automated. Please ensure the elements are available and interactable before using these extension methods to avoid any unexpected exceptions or behavior.
If you find this app helpful and would like to support the development of more tools and projects, consider buying me a coffee. Your support is greatly appreciated!
Thank you for your support!