appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.21k stars 755 forks source link

WindowsFindBy annotation missing 'name' option #641

Open Hyphen31 opened 7 years ago

Hyphen31 commented 7 years ago

Description

The WindowsFindBy annotation defined as an interface in src/main/java/io/appium/java_client/pagefactory/WindowsFindBy.java does not contain a 'name' method .

This prevents using the WindowsFindBy annotation to identify Windows elements by their 'name' attribute in WinAppDriver.

WinAppDriver supports FindElementByName.

Environment

SrinivasanTarget commented 7 years ago

@Hyphen31 Would you like to raise a PR?

SrinivasanTarget commented 7 years ago

@TikhomirovSergey Is dot-net client already supports findElementByName? I see here

Same time wondering seeing this example of using IOSDriver for Windows here? Is it really working that way or is there any reason behind it. @yodurr ping

yodurr commented 7 years ago

We're in the process of moving all our samples to using the WindowsDriver. There's no reason for it other than some of our samples were written before the WindowsDriver was available.

yodurr commented 7 years ago

although in that example I see we are using WindowsDriver :)

joerg1985 commented 6 years ago

We are currently using By.name in combination with the WinAppDriver to get around the missing function call.

WinAppDriver supports find by name, this is a link to a test inside the WinAppDriver using findElementByName.

https://github.com/Microsoft/WinAppDriver/blob/master/Samples/Java/CalculatorTest/src/test/java/CalculatorTest.java

I hope this might help to get this merged.

slavik-r commented 5 years ago

This issue is valid, please fix. The accessibility id is not a substitute for the name. This is actual issue for the WinAppDriver. Using regular @FindBy(name='Field Name') is an option until you need to differentiate between desktop platforms and Web.