Closed MyGg29 closed 1 year ago
Hi @MyGg29 Just to be sure, you mean that the parameter value from node configuration should be prioritirized over the parameter value from msg?
I got your point with the issue than a msg' parameter value will override all following nodes' parameter. My question is, how you would override the node configuration if needed?
Thanks for your feedback,
how you would override the node configuration if needed?
You wouldn't be able to. But it's not really a use case is it ? If you want to do that then put a function block before it with
msg.target = msg.overwritten || "defaultValue"
or something like that.
But right now can't do that
You need to do this :
It would be a breaking change. But it's just a suggestion 😄
However, they do that in node-red-contrib-selenium-webdriver. Their doc is just outdated. It would make it easier for people to migrate.
Hi @MyGg29 (long time sorry...),
I made a new package which switches to this behavior : node-red-contrib-simple-webdriver
Thanks again for your piece of advice,
Hi again, This behavior is anoying because it forces us to reset msg.target to undefined after clicking on something in order not to click on something else with target defined in the node later on.
msg.target shouldn't replace node.target
node.target should replace msg.target. This behavior exists in many other librairies.
This is the same for every other parameters https://github.com/simonradier/node-red-contrib-selenium-wd2/blob/7b8567d345afbf5498983c82544675b231ca9424/src/nodes/node.ts#L71-L72