How to test chrome extensions?

前端 未结 6 1208
别那么骄傲
别那么骄傲 2020-12-07 07:03

Is there a good way to do this? I\'m writing an extension that interacts with a website as a content script and saves data using localstorage. Are there any tools, framework

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 07:25

    I found that I can use Selenium web driver for starting fresh browser instance with preinstalled extension and pyautogui for clicks - because Selenium cannot drive "view" of the extension. After clicks you can make screenshots and compare them with 'expected' ones, expecting 95% of similarity (because on different browsers it is acceptable markup movements to a few pixels).

提交回复
热议问题