Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIASecureTextField is not supported in PageYAML #327

Open
sillpa-polasani opened this issue Sep 28, 2016 · 5 comments
Open

UIASecureTextField is not supported in PageYAML #327

sillpa-polasani opened this issue Sep 28, 2016 · 5 comments

Comments

@sillpa-polasani
Copy link

sillpa-polasani commented Sep 28, 2016

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

@mach6
Copy link
Contributor

mach6 commented Sep 28, 2016

@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. :)

@mach6 mach6 changed the title UIASecureTextField is not supported in the yaml file UIASecureTextField is not supported in PageYAML Sep 28, 2016
@sillpa-polasani
Copy link
Author

//UIASecureTextField[contains(@name,'Passw')] -- this works.
But it is not working //UIAElement[contains(@name,'Passw')] -- so extending to UIAElement will it work ?

@mach6
Copy link
Contributor

mach6 commented Sep 29, 2016

@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!

@mach6 mach6 added the question label Sep 29, 2016
@sillpa-polasani
Copy link
Author

got it Doug.
Thank you.

@mach6
Copy link
Contributor

mach6 commented Oct 3, 2016

@sillpa-polasani did one of the suggested work-arounds work for your use case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants