Closed matewilk closed 1 year ago
Hey @toddtarsi, if you could also be so kind and advise on this one I'd be very grateful!
I also tried overriding suite
/ emitSuite
method from defaults.ts but unfortunately to no avail.
So I'm a little stack here ...
@matewilk - Right, I see whats going on! I remember for a while I was trying to write try catch as a command node. That stuff is tricky. I'll take a look later tonight. I think it's doable, albeit messy and kinda kludgy (also I am usually wrong)
Much appreciated, it's important from the perspective of what I'm building so I'd be grateful if you could look into it.
@matewilk - Would you review this PR?
https://github.com/SeleniumHQ/selenium-ide/pull/1662
I think this should make that capability pretty straightforward.
@matewilk - If this looks alright to you now, please close this issue. Otherwise, feel free to let me know if you see anything wrong when you get there (no pressure)
Hey, thanks for the reminder, closing!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
💬 Questions and Help
Please note that this issue tracker is not a help form and this issue will be closed.
So I have written an exporter which utilises
side-code-export which generates a
.js` file which looks something like this:I find it difficult to wrap my head around on how do I wrap the emitted commands (in between
// test declartation newrelic
and// terminating keyword
with atry catch
block?I've gone through the code, tested out a few things, but I don't see a way to do it, in theory I could use either
beforeEach
hook orgenerateTestDeclaration
for thetry {
part but then I'm not finding anything that would allow me to close it with} catch (e) { ... }
. The// terminating keyword
in the example above is used for bothtest
andsuite
termination, and it always pops up twice, so it would create invalid (and repeated) syntax.Any ideas on how to make it work would be much appreciated.
By the way, my
index.ts
looks like this:and hooks
hook.ts
:For some reason I also can't hook up to
afterAll
,afterEach
andbeforeAll
for some reason,inEachBegin
andinEachEnd
don't seem to work either. (as a side note really, not that this would help with wrapping all the commands withtry catch
)Also, this is how I export my commands to the
index.ts
file fromcommand.ts
:For questions or help please see: