Enter values in a hidden field

2 views
Skip to first unread message

Matthew

unread,
Mar 10, 2010, 8:08:57 PM3/10/10
to pyccuracy
I have a custom control that I'll be using to input data. Its value
will be stored in a hidden field to pass to the next page.

Is there a way to enter data in a hidden field?

Bernardo Heynemann

unread,
Mar 11, 2010, 8:08:58 AM3/11/10
to pycc...@googlegroups.com
Not that I'm aware of. I never thought you would need that, because Pyccuracy's focus is to simulate user interaction. I don't think an user would fill a hidden field. ;)

If you REALLY need that you can use a custom action to do it and inside the custom action use:

context.browser_driver.selenium (this is the actual selenium lib instance).

Just beware of doing that, because you are coupling your action to a given browser driver and when in the future, we release new browser drivers, that action won't be compatible with the new ones.

Cheers,
Bernardo Heynemann


--
You received this message because you are subscribed to the Pyccuracy dev list.

To post to this group, send email to pycc...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/pyccuracy?hl=en

Don´t forget to visit the project's JIRA site at http://jira.stormwindproject.org:8080/browse/PYCCURACY.

Matthew

unread,
Mar 11, 2010, 8:20:35 AM3/11/10
to pyccuracy
True :) What I'm finding is that I'll need to pass an ID to the form
rather than the value of a visible text field itself. What would you
recommend to simulate that action so I can test it?


On Mar 11, 8:08 am, Bernardo Heynemann <heynem...@gmail.com> wrote:
> Not that I'm aware of. I never thought you would need that, because
> Pyccuracy's focus is to simulate user interaction. I don't think an user
> would fill a hidden field. ;)
>
> If you REALLY need that you can use a custom action to do it and inside the
> custom action use:
>
> context.browser_driver.selenium (this is the actual selenium lib instance).
>
> Just beware of doing that, because you are coupling your action to a given
> browser driver and when in the future, we release new browser drivers, that
> action won't be compatible with the new ones.
>
> Cheers,
> Bernardo Heynemann
>

Bernardo Heynemann

unread,
Mar 11, 2010, 8:45:27 AM3/11/10
to pycc...@googlegroups.com
I don't think I understand. What do you mean you have to pass an ID to the form? Can  you elaborate more?

Given that I don't have that much info, I usually try to make my forms/pages as testable as possible. In the company I work for we use client side scripting HEAVILY, so I need to test that at the UI layer. I try as much as I can to avoid filling hidden things or calling javascript functions in my test code, because as I said before, that's not what a User of my app would do, and I want to validate that an actual user CAN do all the things he needs to.

Hope that helps! :) If you provide more detail I'll be more than happy to help you! :)

Cheers,
Bernardo Heynemann

Matthew

unread,
Mar 11, 2010, 8:20:31 PM3/11/10
to pyccuracy
I have a Javascript slider that fills in a hidden field with its
value. Since we're not quite to HTML5, I'd like to use this slider's
hidden field to pass the value to the next page. Because Pyccuracy
does not allow me to physically drag the slider, I thought I could
fake input by filling in the hidden field directly.

Please let me know if you need any more details, or if there is a way
of doing this that I'm not thinking of.

Thanks,
Matthew

On Mar 11, 8:45 am, Bernardo Heynemann <heynem...@gmail.com> wrote:
> I don't think I understand. What do you mean you have to pass an ID to the
> form? Can  you elaborate more?
>
> Given that I don't have that much info, I usually try to make my forms/pages
> as testable as possible. In the company I work for we use client side
> scripting HEAVILY, so I need to test that at the UI layer. I try as much as
> I can to avoid filling hidden things or calling javascript functions in my
> test code, because as I said before, that's not what a User of my app would
> do, and I want to validate that an actual user CAN do all the things he
> needs to.
>
> Hope that helps! :) If you provide more detail I'll be more than happy to
> help you! :)
>
> Cheers,
> Bernardo Heynemann
>

Bernardo Heynemann

unread,
Mar 11, 2010, 10:47:21 PM3/11/10
to pycc...@googlegroups.com
It does allow you to drag the slider ;)

And I drag the "xxx" element to the "yyy" element

Cheers,
Bernardo Heynemann

Matthew

unread,
Mar 13, 2010, 6:34:53 PM3/13/10
to pyccuracy
That's great to know!

Can you link to an example? Also, what's the best place for
documentation? I refer to http://www.pyccuracy.org/documentation/master/index.html,
but it doesn't seem to be up to date.

Thanks,
Matthew


On Mar 11, 10:47 pm, Bernardo Heynemann <heynem...@gmail.com> wrote:
> It does allow you to drag the slider ;)
>
> And I drag the "xxx" element to the "yyy" element
>
> Cheers,
> Bernardo Heynemann
>

Bernardo Heynemann

unread,
Mar 14, 2010, 9:43:07 PM3/14/10
to pycc...@googlegroups.com
The best place so far would be the codebase itself. I have a hard time keeping docs up-to-date for 22 repositories lol ;) But I need to do it, that's for sure ;)

Cheers,
Bernardo Heynemann
Reply all
Reply to author
Forward
0 new messages