selenese-runner-java icon indicating copy to clipboard operation
selenese-runner-java copied to clipboard

AnswerOnNextPromt seems doesn't work?

Open zhiburt opened this issue 3 years ago • 2 comments

    "commands": [{
      "id": "442be203-c4ac-4c3c-97aa-c640cd2789ba",
      "comment": "",
      "command": "answerOnNextPrompt",
      "target": "Hello World",
      "targets": [],
      "value": "Hello World"
    }, {
      "id": "44b6ccce-aa23-4506-977a-a86de9bb36ad",
      "comment": "",
      "command": "executeScript",
      "target": "return prompt(\"Enter a value\")",
      "targets": [],
      "value": "aaa"
    }, {
      "id": "4eba7ac7-0e6d-4b19-bf2a-989f039e74a9",
      "comment": "",
      "command": "echo",
      "target": "${aaa}",
      "targets": [],
      "value": ""
    }, {
      "id": "4eba7ac7-0e6d-4b19-bf2a-989f039e74a9",
      "comment": "",
      "command": "assert",
      "target": "aaa",
      "targets": [],
      "value": "Hello World"
    }]
[2021-06-24 21:43:08.191 +03:00] [INFO] Existing driver found: FirefoxDriver
[2021-06-24 21:43:08.212 +03:00] [INFO] Current speed: 0 ms/command
[2021-06-24 21:43:08.212 +03:00] [INFO] Start: TestCase[asd] (AnswerOnNextPrompt.side)
[2021-06-24 21:43:08.212 +03:00] [INFO] baseURL: https://www.google.com
[2021-06-24 21:43:08.219 +03:00] [INFO] <1> Command#1: answerOnNextPrompt("Hello World")
[2021-06-24 21:43:08.269 +03:00] [INFO] - [Success] URL: [about:blank] / Title: []
[2021-06-24 21:43:08.270 +03:00] [INFO] <2> Command#2: executeScript("return prompt(\"Enter a value\")", "aaa")
[2021-06-24 21:43:08.326 +03:00] [INFO] - [] No page information: [Dismissed user prompt dialog: Enter a value: ]
[2021-06-24 21:43:08.326 +03:00] [INFO] <3> Command#3: echo("${aaa}")
[2021-06-24 21:43:08.341 +03:00] [INFO] - [] URL: [about:blank] / Title: []
[2021-06-24 21:43:08.341 +03:00] [INFO] <4> Command#4: assert("aaa", "Hello World")
[2021-06-24 21:43:08.363 +03:00] [ERROR] Command#4: assert("aaa", "Hello World") => [Failure: Assertion failed (Result: [null] / Expected: [Hello World])]
[2021-06-24 21:43:08.368 +03:00] [INFO] End(0.152sec): TestCase[asd] (AnswerOnNextPrompt.side)
[2021-06-24 21:43:08.368 +03:00] [INFO] End(0.000sec): TestSuite[Default Suite] (AnswerOnNextPrompt.side)
[2021-06-24 21:43:08.369 +03:00] [INFO] End(0.000sec): TestProject[AnswerOnNextPrompt] (AnswerOnNextPrompt.side)
1624560188373	Marionette	INFO	Stopped listening on port 41295
JavaScript error: https://start.fedoraproject.org/, line 296: TypeError: $(...).uls is not a function
[2021-06-24 21:43:09.034 +03:00] [INFO] Quit: FirefoxDriver
[2021-06-24 21:43:09.034 +03:00] [INFO] Exit code: 3 (FAILURE)

zhiburt avatar Jun 24 '21 18:06 zhiburt

I fixed this problem and released version 3.34.0. Please test it.

vmi avatar Jul 04 '21 16:07 vmi

Confirmed :+1:

But can I ask you how you did get to this solution ?:) I mean I put a couple of hours to this issue as well but haven't succeeded :disappointed:

zhiburt avatar Jul 05 '21 08:07 zhiburt