daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest May 23rd, 2018 202 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from selenium import webdriver
  2.     from kenZen.home import home
  3.     from kenZen.addteam import addteam
  4.  
  5.     class kenzen():
  6.  
  7.         print ("Test")
  8.  
  9.     driver = webdriver.Chrome(executable_path='E:Learningchromedriver.exe')
  10.  
  11.     def login():
  12.  
  13.  
  14.         driver.maximize_window()
  15.  
  16.         driver.implicitly_wait(2000)
  17.  
  18.         driver.get("http://qa.com")
  19.  
  20.         username = driver.find_element_by_xpath("/html/body/div[1]/div/div[2]/div/div[2]/form/div[1]/input")
  21.         password = driver.find_element_by_xpath("/html/body/div[1]/div/div[2]/div/div[2]/form/div[2]/input")
  22.  
  23.         username.send_keys("pardeepk@gmail.com")
  24.         password.send_keys("abc@123")
  25.  
  26.         button = driver.find_element_by_xpath("/html/body/div[1]/div/div[2]/div/div[2]/form/button")
  27.  
  28.         button.click()
  29.  
  30.         home()
  31.         addteam()
  32.  
  33.         print("pass")
  34.  
  35.  
  36.     **Console error:**
  37.  
  38.     Traceback (most recent call last):
  39.       File "E:LearningWorkplacekenZenkenZenLogin.py", line 2, in <module>
  40.         from kenZen.home import home
  41.       File "E:LearningWorkplacekenZenkenZenhome.py", line 1, in <module>
  42.         from kenZen.Login import driver
  43.       File "E:LearningWorkplacekenZenkenZenLogin.py", line 2, in <module>
  44.         from kenZen.home import home
  45.     ImportError: cannot import name 'home'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top