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

Pause action not working #75

Open
ocundale opened this issue Sep 16, 2014 · 4 comments
Open

Pause action not working #75

ocundale opened this issue Sep 16, 2014 · 4 comments

Comments

@ocundale
Copy link

I need to wait for some elements to load on the page for my test, but whenever I try and use the pause action, it returns undefined?
Even when I've recorded the action via hux --record, it doesn't seem to like it... Here's my json:

[
  {
    "action": "screenshot"
  },
  {
    "action": "pause",
    "ms": 5896
  },
  {
    "action": "screenshot"
  },
  {
    "action": "pause",
    "ms": 3218
  },
  {
    "action": "click",
    "y": 318,
    "x": 702
  },
  {
    "action": "pause",
    "ms": 1608
  },
  {
    "action": "click",
    "y": 318,
    "x": 554
  },
  {
    "action": "pause",
    "ms": 1758
  },
  {
    "action": "screenshot"
  }
]

and my terminal Output:


---
Replaying and writing screenshots for "toggle button"

---
  Taking screenshot 1
  Pause for undefined ms
  Clicking (570, 316)
  Taking screenshot 2
  Clicking (135, 164)
  Clicking (43, 382)
  Taking screenshot 3

Any help appreciated!

@chenglou
Copy link
Owner

I copy pasted your exact record file and ran hux --write on it. It works for me. Maybe there's something else?

@ocundale
Copy link
Author

Thanks chenglou, I am up and running now, however it might be worth stating that you need to run this command if you manually edit the JSON, as this was the the step I missed. Cheers!

@ocundale
Copy link
Author

Is there a way to use the tool to do record a single test and compare the results of this with some screenshots that I have already taken?
For example, the current method compares two states by running tests for both cases at once. I want to create a single test that I can run and it will take a few screenshots and compare them to a fixed set of screenshots I have taken previously, is this possible? Cheers :)

@chenglou
Copy link
Owner

Yes. Check here.

Specifically for you: hux --compare --only taskName.

I'm not sure what you mean by this?

it might be worth stating that you need to run this command if you manually edit the JSON

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

No branches or pull requests

2 participants