JavaScript-Error in HTML-Report when using ScenarioResult.write #254

Closed
klausbayrhammer opened this Issue Mar 12, 2012 · 0 comments

Comments

Projects
None yet
2 participants
Contributor

klausbayrhammer commented Mar 12, 2012

We tried to attach some additional information to the scenarioresult to be printed in the html-report using code like this:

@After
public void after(ScenarioResult res) {
    res.write("myText");
}

There we've had two different problems. Firstly the code above is rendered into the following js-code

formatter.write(myText);

This code produces the following errormessage Uncaught ReferenceError: myText is not defined

When we add the quotes ourselves in the javacode

@After
public void after(ScenarioResult res) {
    res.write("\"myText\"");
}

The following js-code is js-code is produced

formatter.write("myText");

Unfortunately this results in Uncaught TypeError: Object [object Object] has no method 'write'

greets Klaus

@aslakhellesoy aslakhellesoy referenced this issue in cucumber/cucumber-html Mar 25, 2012

Closed

Implement write(string) #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment