Contributions
- 382Views0likes0Comments
Compare a value returned dynamically using regEx
Hi I want to compare a text returned by an object using regEx as the number in actual text changes dynamically. Here is what I am using var actualName ="Test_QA (Abcdef XY8)"; var regExPattern = "Test_QA \(Abcdef XY\d{1,2}\)"; aqObject.CompareProperty(actualName, cmpMatches, regExPattern); Output:The property value "Test_QA (Abcdef XY8)" does not match the pattern "Test_QA (Abcdef XYd{1,2})". 20:02:51 Normal 0.00 Can you please help with the right syntax?Solved433Views0likes2CommentsHow to read a dynamically generated file using regular expression
Hello, I want to compare a ".csv" file that's generated during the test to a baseline. I added the baseline to the Files check point using 'byte to byte' comparison. The issue is the file generated is dynamic and has a timestamp at the end [with format -Output_2022-07-21.csv]. I am trying to use regular expression in the file path as shown below but it fails. Can you please help? function Test1() { Files.BaseFile.Check("C:\\Exported_Data\\Output_.*.csv"); } Also ifthere is any other way to read such type of file please advise. Thanks in advance! SravaniSolved820Views0likes6Comments