Skip to content

Conversation

valfirst
Copy link
Collaborator

@valfirst valfirst commented Oct 21, 2021

Change list

Keep the unified naming of methods and toString implementations.

Types of changes

What types of changes are you proposing/introducing to Java client?
Put an x in the boxes that apply

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

Unify locator factory-methods naming and toString implementations to follow the same approach as it's done in Selenium.

@valfirst valfirst force-pushed the unify-naming-of-factory-methods-in-mobile-by branch from bcac648 to 8e7d772 Compare October 21, 2021 08:19
@mykola-mokhnach
Copy link
Contributor

I'm not quite sure I want to lend this change. It would only create more hassle for end users without giving any actual benefits

@valfirst
Copy link
Collaborator Author

@mykola-mokhnach ok, that's up to you, feel free to close the PR

@mykola-mokhnach
Copy link
Contributor

@SrinivasanTarget What do you think regarding the above?

@mykola-mokhnach
Copy link
Contributor

We could do it this way - old locators stay, but get @Deprecated annotation with the recommendation to use the fixed ones, so users could have a chance to update their scripts until we remove the deprecated stuff completely

@mykola-mokhnach
Copy link
Contributor

mykola-mokhnach commented Oct 21, 2021

I was also thinking about renaming MobileBy to AppiumBy. MobileBy makes sense for iOS and Android, but does not make sense for mac and windows and also other non-mobile drivers, so we need some more generic name. The renaming strategy could be exactly the same as described above

@saikrishna321
Copy link
Member

I like the idea to add Deprecate tag and also rename to AppiumBy

@SrinivasanTarget
Copy link
Member

I was also thinking about renaming MobileBy to AppiumBy. MobileBy makes sense for iOS and Android, but does not make sense for mac and windows and also other non-mobile drivers, so we need some more generic name. The renaming strategy could be exactly the same as described above

AppiumBy seems more relevant and as you said let's deprecate complete MobileBy stuffs.

@valfirst valfirst marked this pull request as draft October 22, 2021 12:23
@valfirst valfirst force-pushed the unify-naming-of-factory-methods-in-mobile-by branch from 8e7d772 to 2cf96a7 Compare October 24, 2021 21:30
@valfirst valfirst changed the title refactor!: unify MobileBy methods naming and toString implementations refactor: unify locator factories naming and toString implementations Oct 24, 2021
@valfirst valfirst marked this pull request as ready for review October 24, 2021 21:34
@valfirst valfirst force-pushed the unify-naming-of-factory-methods-in-mobile-by branch from 2cf96a7 to ba527a7 Compare October 26, 2021 19:32
@valfirst valfirst force-pushed the unify-naming-of-factory-methods-in-mobile-by branch from ba527a7 to c429c4e Compare October 26, 2021 19:40
}

@Override public String toString() {
return String.format("By.%s: %s", locatorName, remoteParameters.value());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe AppiumBy?

@valfirst valfirst force-pushed the unify-naming-of-factory-methods-in-mobile-by branch from c429c4e to 667f81a Compare October 26, 2021 20:41
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

Successfully merging this pull request may close these issues.

4 participants