I have run into a snag with dynamic ids. The attach_file command needs the id name of the input type="file". The problem is that the id is dynamic
(id="document_22") #indicating the 22nd document uploaded to this section.
Is there a way to get the id of an element? something like...
attach_file(find(:xpath, ".//input[@name='file_upload']").get('@id'),
'C:\\Users\\testbox\\Documents\\testdoc.xls')