Using browser.screenshot(name = '/var/aa', suffer = '.jpg') filename turn out to 'aaxiHXq8.jpg'
Using browser.screenshot(name = '/var/aa', suffer = '.jpg') filename turn out to 'aaxiHXq8.jpg' I don't know why? need some help
IIUC the string xiHXq8 is a randomly generated string which gets appended to the filename aa you provide in browser.screenshot(name, suffer). I assume this is done to avoid to replace an already existing file with the same name. Just a guess.
@andrewsmedina browser.screenshot uses tempfile.mkstemp to get a filename with a random portion to the filename. Is this the desired behaviour? In the event of the provided filename already existing, should we write a new file (current behaviour, due to random string) or throw an exception? Either way, overwriting the existing screenshot is definitely something to avoid.
This is very confused. Can you add a switch to use my real filename or add random postfix?
Fixed by #949