Page 1 of 1

Trimming sql data to validate against

Posted: Mon Dec 17, 2018 12:57 pm
by andy.simpson
Hi,

I have an issue where I'm validating date information in our web flow form data in our SQL tables, the date in the web flow is a standard format eg. 13/12/2018 however the SQL data driven information format includes the time so 13/12/18 14:46:16 so causes the test to fail. Normally id just do attribute contains but its the wrong way around so still fails, how do I get around this? would i be able to trim the value using regex? If so how do I do this with data driven information?

Thanks

Re: Trimming sql data to validate against

Posted: Wed Dec 19, 2018 12:43 pm
by RobinHood42
Hi,

I assume that you're retrieving your data from an Ranorex SQL data connector/source, which is bound to a variable. You'll now have to create a CodeModule to retrieve the actual date information from your web form. This value needs to be compared to a parsed/normalized form of the value of the variable.

I hope this helps.

Cheers,
Robin