UIASecureTextField is not supported in PageYAML
sillpa-polasani opened this issue · 5 comments
SeLion Version
All
Component
- client
- codegen
Expected Behavior
In the yaml file UIASecureTextField - for iOS is not supported by selion.
Password fields are of type UIASecureTextField.
Actual Behavior
Steps to Reproduce
@sillpa-polasani Can UIAElement
be used in the interim? Also, you should be able to create a new class which extends UIAElement
and add it as a custom element which the code generator will consider. Course, if you're going to go that far, feel free to submit the new element class as a PR for all to use. :)
@sillpa-polasani It doesn't what matter the locator
is. The point I was making is you should be able to do this in your PageYAML and map the element to a UIAElement
object.
securePasswordUIAElement:
locators:
US: "//UIASecureTextField[contains(@name,'Passw')]"
Doing this, the code generator will create the following in your page object class;
// member variable
private UIAElement securePassword;
// method
public UIAElement getSecurePasword()
As long as the class/type UIAElement
provides all of the functionality you need to interact with the target element in the application, you should be good.. Otherwise, you need to create a new
class UIASecureTextField extends UIAElement { ... }
and add the missing functionality. If you have to take this path, you can then add the type UIASecureTextField
as a customElement
for the code generator to consider. Once the code generator knows about it your PageYAML can then be like follows;
securePasswordUIASecureTextField:
locators:
US: "//UIASecureTextField[contains(@name,'Passw')]"
Also, if you do end up creating a new UIASecureTextField
class, please contribute it back to SeLion by raising a PR.
Cheers!
got it Doug.
Thank you.
@sillpa-polasani did one of the suggested work-arounds work for your use case?