-
Notifications
You must be signed in to change notification settings - Fork 675
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
Add speed
option for actions
#865
Comments
Note that factors should multiply, so if we have |
Also I guess it should be between |
I've updated the first post with the feature proposal. What do you think about it? \cc @inikulin @VasilyStrelyaev @DevExpress/testcafe |
@AlexanderMoskovkin I don't think we need test controller option. There should be CLI and programmatical API option. Also, min value should be |
Imho, there should be test `my test` (async t => {
t.speed = 0.5;
// ... bunch of slow actions
await t.click({ speed: 1 });
// ... bunch of slow actions
}); |
I don't really like idea to multiply factors. May be just use speed factor specified for action, if we don't have it - use factor specified for test controller. |
By default it will be slow mode? speed === 1? |
1 - fast, 0.01 - slow |
Sure, sorry |
Yes, I'm agree |
I think the |
I don't like idea to multiply factors too. |
For example some ASPx controls doesn't work properly when you type (or click, dblclick, drag) too fast like a robot (some script expect human-behavior with some delays between actions) . With this option you can run only several actions in slow mode but run the others fast (it will decrease tests duration) |
Can you give a real case when this may be useful. I can't |
Ok, it was discussed in private, I'll update the top post a little later |
@AlexanderMoskovkin Taking into account the discussion, the top post doesn't seem to be up-to-date yet. Have you already decided on all the things? Can you pls update it? |
Not yet. I'll notify you |
I've updated the top post. Here describes api changes. /cc @inikulin @VasilyStrelyaev |
+1 to having ability to delay or speed up certain actions. |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
* Add `speed` option for actions (closes DevExpress#865) * Fix tests * Fix error message * Fix type aciton after rebase * Fix pressKey test * Changes for legacy-api
Proposal
This affects to delay between action parts (for example between mousedown and mouseup in
click
, or between each symbol typing intypeText
), to the cursor speed. This option you can use if you need to emulate human-behavior (it can be useful for cases when your scripts work properly only if you do actions no too fast).Now we have the following options:
Mouse Action Options, Click Action Options, Typing Action Options
.I suppose it should be a new type of options:
Mouse, Click and Typing options extend it.
So, we add
options
argument toSelect Text
,Type Text
andPress Key
actions.Multiply
If the test run speed options is set to some
value1
and action option is set to thevalue2
- it will be multiplied and the action will be executing with speedvalue1 * value2
The text was updated successfully, but these errors were encountered: