Skip to content

.Net: The Class target was added to PageObject attributes#855

Closed
TikhomirovSergey wants to merge 1 commit intoSeleniumHQ:masterfrom
TikhomirovSergey:Attribute_Enhancement_DotNet_PageObjects
Closed

.Net: The Class target was added to PageObject attributes#855
TikhomirovSergey wants to merge 1 commit intoSeleniumHQ:masterfrom
TikhomirovSergey:Attribute_Enhancement_DotNet_PageObjects

Conversation

@TikhomirovSergey
Copy link
Copy Markdown
Contributor

This change change provides to end user some additional options.

For example
User needs to develop page object like that:

//[FindsBySequence]
[FindsBy(How = How.Id, Using = "SomeId", Priority = 1)]
[FindsBy(How = How.ClassName, Using = "SomeClass", Priority = 2)]
//and so on
//the construction above describes how to find the root element
class PageObject
{
[FindsBy(How = How.TagName, Using = "SomeTag")]
IWebElement e; //this is the nested element
}

At this case they only need to develop their own customized
IPageObjectMemberDecorator
implementation that can handle classes/members like above

This change change provides to end user some additional options.

For example
User needs to develop page object like that:

```csharp
//[FindsBySequence]
[FindsBy(How = How.Id, Using = "SomeId", Priority = 1)]
[FindsBy(How = How.ClassName, Using = "SomeClass", Priority = 2)]
//and so on
//the construction above describes how to find the root element
class PageObject
{
[FindsBy(How = How.TagName, Using = "SomeTag")]
IWebElement e; //this is the nested element
}
```
At this case they only need to develop their own customized
[IPageObjectMemberDecorator](https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/support/PageObjects/IPageObjectMemberDecorator.cs)
implementation that can handle classes/members like above
@TikhomirovSergey TikhomirovSergey changed the title The Class target was added to PageObject attributes .Net: The Class target was added to PageObject attributes Jul 30, 2015
@barancev barancev added the C-dotnet .NET Bindings label Sep 3, 2015
@jimevans
Copy link
Copy Markdown
Member

The PageFactory and its supporting classes (including attributes) are marked deprecated in this repository. Any changes in them will need to be handled by the owner of the new repository for them, once a new owner is found.

@jimevans jimevans closed this Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-dotnet .NET Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants