firefox外掛screengrap +python autoit+selenium實現整個網頁的長截圖功能
筆記:本人用的是python3.6.6 32位的版本,安裝成功了pyautoit庫及autoit庫 本人的firefox版本為45.0可以安裝firebug、fire path、及screengrap外掛 直接程式碼如下: import autoit import unittest import time import sys from datetime import datetime
from actions import Actions
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver import ActionChains
from
sys.path.append(‘D:\jftest1_CG\test1’)
class Test_Newyyy_pctz_shfk (unittest.TestCase):
def test_pcLogin(self):
fp = webdriver.FirefoxProfile(r"C:\Users\mhf\AppData\Roaming\Mozilla\Firefox\Profiles\cv6txwo2.default")
driver = webdriver.Firefox(fp)
# driver = webdriver.Firefox ()
driver.get (“