点导入Java错误无法导入Java?

时间:2019-02-16 19:16:05

标签: python pyjnius

import.java.util.ArrayList;
import csv
import pynput
import.java.util.ArrayList;


from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from array import array
from pynput.keyboard import Key ,Controller
from selenium.webdriver.common.keys import Keys
Keyboard = Controller()






def csv_url_reader(url_obj):
   reader =  csv.DictReader(url_obj,delimiter = ',')

   for line in reader:
       url = line["URL"]
       title = line["Title"]
       print  (url+title)
       driver = webdriver.Chrome(r'C:\Users\Administrator\Downloads\chromedriver_win32\chromedriver')
       act = ActionChains(driver)
       driver.get(url)
       driver.find_element_by_name("q")

        #driver.find_element(by.cssSelector("body")).sendKeys(Keys.CONTROL + 't');

       Keyboard.type("projectpython")
       driver.execute_script("window.open('');")  # opens new tab
        tabs2 = driver.windows_handles
       driver.switch_to().window(tabs2.get(1))



       act.send_keys(Keys.CONTROL).send_keys('a')

       assert title in driver.title

我试图导入Arraylist,但是在Java上出现红色标记

我尝试使用pip install import-java安装Java,但出现此错误

命令“ python setup.py egg_info”失败,错误代码为1

我已经尝试了一切,但是我无法成功,请帮助我解决这个问题

0 个答案:

没有答案