You have written a script for the new feature, but this feature does not allow adding records of the same name. What should I do?
Delete related records during initialization? If you are not familiar with the business, the table structure, and the relationship between the master and slave tables are complex, what should you do?
Can I manually change the driver data before each operation? Trouble!
I thought of a stupid way.
Add an event to the Excel driver file:
Private sub workbook_activate ()
Sheet3.cells (2, 6) = sheet3.cells (2, 6) + 1
Thisworkbook. Save
End sub
Add a method to the ruby script:
Def open_excel (data_source)
Begin
Excel = win32ole. New ("Excel. application ")
Excel. Visible = true
Workbook = excel. workbooks. Open (data_source)
Workbook. Close
Excel. Quit
Rescue => E
Raise E
End
End
Finally, it is referenced in run_testcase.
To put it simply, run-> open excel in ruby-> Add and save cells and values in Excel-> close excel in Ruby automatically
Good land ?! There should be a lot of other ideas, and we will try again later.