expfactory / expfactory-python

python module for managing experiment factory javascript experiment files, batteries to deploy them to (eg, psiturk), and virtual machines to host the compilation of those things.
http://expfactory.readthedocs.org/
MIT License
4 stars 11 forks source link

changed testing behavior to only click one button_class button at a time #76

Closed IanEisenberg closed 8 years ago

IanEisenberg commented 8 years ago

I have no idea what selenium is (a python webbrowser module?), but I believe this should just click the random button that you had already selected.

manbat-zz commented 8 years ago

does this actually work? I had tried something similar and I think I had my reasons for not using button.click() - I think there was a bug with selenium when I did it this way. If you are 100% sure and have tested I will merge and push to pypi, otherwise we need to maintain doing the second command (eg, button.click()) using jquery.

manbat-zz commented 8 years ago

This also doesn't re-select the button after the change- I don't think this works.

IanEisenberg commented 8 years ago

It seemed to work when I stepped through. I can look again. An alternative is to just select a random integer in python and then use string completion to put it into a jquery call

edit: checked again. It is working fine, though I may be missing some failure point

vsoch commented 8 years ago

It likely worked for the regular case of pushing a button. It needs to be tested with the other case of enabling a button first then pushing it (eg the hot task)

IanEisenberg commented 8 years ago

Ah, of course I should have mentioned that I tested that. It seems to enable a button and then click it, no problem. It succeeds at going through the CCT_hot.