Attachment Management in Opkey - New UI



The Attachment Management feature helps store the attached file in the opkey domain. Now irrespective if system/user this file will be available in a particular project. In order to use this file for attachment purposes, we can use its path. You can upload a wide range of document formats, including Excel spreadsheets, Word documents, image files, PDFs, etc. 


Once these documents are uploaded, you have the flexibility to incorporate them into your test cases to meet your specific testing needs. This integration enhances the versatility of your testing process, allowing you to work with diverse data sources efficiently. 


To use the attached file in the test case, you'll need its path, which can be obtained using the keyword Getfilepath. Then, map the uploaded file to its Input Data. To obtain the path the user will have to name the Output parameter, which will have the path for particular file. 


Following this approach eliminates the possibility of failures due to file unavailability at specified paths in the system.



Note- Executable files is prohibited to safeguard your system from potential risks.


For instance, imagine you are conducting software testing for a financial application. You can utilize this feature to upload sample Excel files containing various financial transactions or reports. Subsequently, you can use these uploaded documents within your test case to simulate real-world financial scenarios. 


Let's understand how a file can be uploaded and managed in Opkey.


1. Click on the tools icon on the Opkey dashboard. 

 

2. Select 'Attachment Management' from the available options in the window. Another window pops up where you can add the file you want to use as an attachment.


 


3. Click the Add Attachment icon. Browse & select your file to be uploaded.

4. The added file(s) appear in the list. You can delete, update, export, or search file(s) by using the corresponding buttons on the Attachment Management window as shown below.



5. Uploaded files are shown in a list with details such as File Name, Extension, Attachment Type, File Size, Uploaded By, and Uploaded on.


6. You can also select an attachment and click the Used By button at the bottom to see where the attachment is used. It shows details such as Name, Full Path, Description, and Component Type.



Let us understand its use with an example.


Consider a scenario where you want to upload a file on a website by providing the file path. Here we are taking an example of https://cgi-lib.berkeley.edu/ex/fup.html  


We will first upload the file which we will use in the Attachment Management window.




The uploaded file can be seen in thre attachement management window.



And the same file will be uploaded to the website which we'll automate. We'll copy the file path by visiting the Security tab of the file.



The path copied will also be added to in the website by clicking the Choose File button.


The attached file can be seen on the website. 



Next, we'll create a reusable component and add the GetFilePath keyword to fetch the attached file's path.



From the three dots on the right side, click on the Set data icon.


On the window, click the Data Drive option.


From the dropdown, select Attachment Management.


Click on the attached file to map.



Now set the output variable by clicking on the Output tab.


Add the next keyword, Web_ClickByText


Click the Set Data icon respective to the step.



Enter the Text to search data as Choose File. 



Add Web_TypeByText keyword.



Click on the Set Data icon.


Enter Text to search as File Name.


Click on the Data Drive option next to TextToType.


Select Data Output from the dropdown.



Now map the path with the data output.




Now save the test case.





Using Attachment Management for Role-Based Authentication


The file containing the Role-Based User Credentials must be updated with the correct user credentials before execution and uploaded in the Attachment Management section.

Approver Role credentials


If approval workflows are enabled on the Oracle Environment, approver credentials are also to be updated in the same user credentials file. In case approval workflows are not configured, the approver role should be kept blank.


For example, an approver can have the below roles.


Role

Username

Password

AP Invoice Creator

Opkey_User

Opkey123

AP Accountant

Opkey_User

Opkey123

AP Invoice Approver

Opkey_User

Opkey123

FA User

Opkey_User

Opkey123


You've reached the end of this article and are now well-prepared to upload attachments on Opkey. 


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article