My AUT contains a few “Upload image” features that I wish to test out. The test case for that, if I recall correctly, would be as follows :
click on the button to upload the image
upload the image
wait for page load
verify that the image is on the page, in a specified container
I know of how to upload file via absolute pathname, as well as how to wait for image to be present. The issue is that, with the uploading of file, it is done via absolute pathname, which creates portability issues as well as defeating the purpose of the project structure (projects should contain all the relevant static data, including image dependencies).
Is there a way to upload file via relative pathname, if not use the image saved to a test object to perform the upload?