Python or Jython script to change a value in XML file and update to a new value and use as data
Comments
-
store in output file
You typically use the Write File tool to write files. However, it is typical to store XML nodes in memory using an XML Data Bank. Subsequent tests can reference the node or nodes that you select in the XML Data Bank using a "custom column name" you also configure.
picked up in python and changing few values inside XML
Have you considered using the "Allow Alteration" option in the XML Data Bank or XML Transformer tool? This will allow you to modify text nodes in the document. You can change the value and can reference variables in the replacement value if needed. You can also setup an extraction on the root node if you need to extract the entire document with the alteration.
0 -
ok thank you, How can i send customized python script for asserting date range calculations and time stamp?
0 -
How can i send customized python script for asserting date range calculations and time stamp?
Use the XML Assertor. There are various built-in assertions available, including ones for Data/Time Range/Difference. If you need to script something custom then you can add the "Custom" assertion which allows you to provide a script.
1 -
Thank you
0