ad 2) I agree that public field isn't elegant, but I think that FunctionTable class provides sufficient api itself, so making its instance a public static final field should be enough. I didn't find a reason why this class couldn't be a "raw" singleton as it contains only information about available XPath functions in key-value manner (schematically).
Last edit: Adam Afeltowicz 2014-10-10
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Adam,
sorry for the slow progress on this topic.
Thanks for the sample.
I still have a question. What is your use case for this extension. Is this something that you can do with real browsers also?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
as far as I know custom XPath functions cannot be defined for real browsers - that's why this ticket is FR ;). We run testscripts defined in textfiles (so they can be prepared independently to testtool development) using HtmlUnit and sometimes standard XPath functions are not sufficient to repeat whole scenario. Of course each case could be wrapped as special actions, but this seems less flexible.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can anyone give a comment if this patch could be (or not) committed into main branch?
Thanks in advance.
Last edit: Adam Afeltowicz 2014-10-09
Hi Adam,
did a quick lock. Two things:
Last edit: RBRi 2014-10-10
Hi Ronald,
please let me know if you are satisfied with my answers.
Last edit: Adam Afeltowicz 2014-10-13
Hi Ronald,
ad 2) I agree that public field isn't elegant, but I think that FunctionTable class provides sufficient api itself, so making its instance a public static final field should be enough. I didn't find a reason why this class couldn't be a "raw" singleton as it contains only information about available XPath functions in key-value manner (schematically).
Last edit: Adam Afeltowicz 2014-10-10
ad 1) Please find example usage in attachment
Hi Adam,
sorry for the slow progress on this topic.
Thanks for the sample.
I still have a question. What is your use case for this extension. Is this something that you can do with real browsers also?
Hi Ronald,
as far as I know custom XPath functions cannot be defined for real browsers - that's why this ticket is FR ;). We run testscripts defined in textfiles (so they can be prepared independently to testtool development) using HtmlUnit and sometimes standard XPath functions are not sufficient to repeat whole scenario. Of course each case could be wrapped as special actions, but this seems less flexible.