Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

iOS LoginPage example is confusing #4

Open
mokagio opened this issue Apr 16, 2015 · 4 comments
Open

iOS LoginPage example is confusing #4

mokagio opened this issue Apr 16, 2015 · 4 comments

Comments

@mokagio
Copy link

mokagio commented Apr 16, 2015

Hello, thanks for putting this example project together.

I have a little feedback, the login method of the LoginPage for iOS is a bit confusing.

I understand that using the current approach might be faster, but being non standard it add mental overhead on top of the POP architecture, which is already non trivial to grasp at first glance, at least for me.

It might be better to go for the default approach, so that new comers don't have to worry about the side effects and the parameters values.

@krukow
Copy link
Contributor

krukow commented Apr 16, 2015

@mokagio: do you mean the use of fast keyboard entry?

 enter_text(user_field, user, use_keyboard: false)
    enter_text(pass_field, pass, use_keyboard: false, wait: false)
    enter_text(site_field, site, use_keyboard: false, wait: false)

    # If we used use_keyboard: true, this wouldn't be necessary
    # but use_keyboard: false is faster so we use it here
    touch("UITextField") # side-effect to have Add Site button enable
                      # after fast keyboard entry (= UIAutomation setValue)

@mokagio
Copy link
Author

mokagio commented Apr 16, 2015

Yes I'm referring to that


Gio
Sent from Mailbox for iPhone

On Thu, Apr 16, 2015 at 4:25 PM, Karl Krukow [email protected]
wrote:

@mokagio: do you mean the use of fast keyboard entry?

 enter_text(user_field, user, use_keyboard: false)
    enter_text(pass_field, pass, use_keyboard: false, wait: false)
    enter_text(site_field, site, use_keyboard: false, wait: false)
    # If we used use_keyboard: true, this wouldn't be necessary
    # but use_keyboard: false is faster so we use it here
    touch("UITextField") # side-effect to have Add Site button enable
                      # after fast keyboard entry (= UIAutomation setValue)

Reply to this email directly or view it on GitHub:
#4 (comment)

@krukow
Copy link
Contributor

krukow commented Apr 16, 2015

I agree. It is not great for learning. I don't have time right now to change it- would you be interested in making a pull request that changes it?

@mokagio
Copy link
Author

mokagio commented Jun 6, 2015

Hey @krukow sorry for this late reply. I was hoping to find some time to look into this and submit a PR but I haven't yet, and I don't think I'll have time in the next month either 😕

Thanks, and keep up the great work on Calabash 🍻

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

No branches or pull requests

2 participants