The log.html misses captured images when output folder is relocated out of Robotframework repo

I am using robotframework to automate the system tests for the embedded sw. After executing the tests, the log.html, output.xml and report.html are saved in Output folder inside the robotframework repo. The system tests in the output folder have some images generated while running the tests. If I open the report keeping Output folder inside the robotframework repo then all images are displayed like the following.

enter image description here

But if I relocate the Output folder to some other place, then the images are not displayed and the log.html file looks for the images in the Output folder placed in the robotframework repo instead of the new location of the Output folder.
enter image description here
The implementation of plotting the images is given below

def plot_data(
self,
data: Data,
*,
title: Optional[str] = None,
marker: str = “o”,
markersize: float = 2.0,
):
“””Plots the data given and adds it to the report file generated by
Robot Framework. A .png for the plotted data is also available in the
same location as the report file.”””

    testcase, outputdir = self._get_test_variables()
    plttitle = title if title is not None else testcase
    filetitle = self._strip_string_for_path(plttitle)

    fig_path = os.path.join(
        outputdir,
        f'{filetitle}-DataVerification-{datetime.now().strftime("%Y%m%d-%H%M%S")}.png',
    )

    plt.title(plttitle)
    plt.xlabel(data.x_label)
    plt.ylabel(data.y_label)
    plt.plot(
        data.x, data.y, label=data.y_label, marker=marker, markersize=markersize
    )
    plt.legend()
    plt.savefig(fig_path)
    self._log_plot(fig_path)
    plt.close()

Here the outputdir and fig_path are absolute path to the Output folder in the Roboframework repo. The robotframework repo is the folder where out whole auto-test framework lies.
Do anyone have seen the same issue? Any solution?

After result folder “Output”has been generated by robot.rebot() function, I have tried to change output.xml file by changing the path to the png images and regenerate the log.html file, but it did not work for me. I also tried to make the output.xml to ignore the absolute path to the output folder in the robotframework and always tried to search for .png images in the current folder but I could not find the way in python.

New contributor

Shahid is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật