Robot Framework absolute path relative path turn

 

 

 

As shown above, add items need to upload your picture, so, when it will fill in the script design image path, to automate the destination path can automatically get into the picture upload

 

 

 

 

 

 

C: \\ Users \\ Beckham \\ Desktop \\ test2 \\ autoTest \\ EVALUATION .png

If you use the above path, the others to use this basic, this picture must be in the presence of this path, otherwise not read the picture

 

To solve this problem, the application robotframework own internal functions, say the absolute path into a relative path, as follows

 

Add "$ {CURDIR} \\"

 

 

 

 

 

 

 

 

You can compare the above wording, to know how to operate

 

In this way, the picture stored in the automated scripts directory, you can successfully get

 

 

Guess you like

Origin www.cnblogs.com/becks/p/12594805.html