Zarkonnen / se-interpreter

Interpreter for Selenium Builder JSON scripts based on node.js and wd.
34 stars 31 forks source link

storeText and Text #39

Open ghost opened 9 years ago

ghost commented 9 years ago

It looks like when storeText is specified by Selenium Builder output, this project interprets it to Text, which is not the same. Is this planned? I saw something in interpreter.js which looks like it may abstract that, but maybe not properly in this case?

Zarkonnen commented 9 years ago

Noted, will look into this. A repro script would be useful, though I can probably make one of my own. :)

Zarkonnen commented 9 years ago

So this works for me. I may have misunderstood your report, sorry.

{
  "type": "script",
  "seleniumVersion": "2",
  "formatVersion": 2,
  "steps": [
    {
      "type": "get",
      "url": "http://sebuilder.github.io/se-builder/"
    },
    {
      "type": "storeText",
      "locator": {
        "type": "css selector",
        "value": "p"
      },
      "variable": "txt"
    },
    {
      "type": "print",
      "text": "${txt}"
    }
  ],
  "data": {
    "configs": {},
    "source": "none"
  },
  "inputs": [],
  "timeoutSeconds": 60
}

SE-Interpreter 1.0.7
storetext: Starting test (firefox) storetext
storetext: Success {"type":"get","url":"http://sebuilder.github.io/se-builder/"}
storetext: Success {"type":"storeText","locator":{"type":"css selector","value":"p"},"variable":"txt"}
A faster way to build tests.
storetext: Success {"type":"print","text":"${txt}"}
storetext: Test passed
1/1 tests ran successfully. Exiting