Skip to content

Commit

Permalink
Update naukri.py
Browse files Browse the repository at this point in the history
  • Loading branch information
navchandar committed May 6, 2016
1 parent a71871d commit ed36849
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions naukri.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_Login(self):
saveXpath = ".//*[@id='rPanel']/div/div/form/div[5]/div/button"
uploadNew = "uploadLink"
attachXpath = '//*[@id="attachCV"]'
cvID = "attachCV"
emailFieldElement = WebDriverWait(driver, 5).until(lambda driver: driver.find_element_by_id(emailID))
passFieldElement = WebDriverWait(driver, 5).until(lambda driver: driver.find_element_by_id(passID))
loginButtonElement = WebDriverWait(driver, 5).until(lambda driver: driver.find_element_by_name(loginbuttonName))
Expand Down Expand Up @@ -59,13 +60,14 @@ def test_Login(self):
self.driver.find_element_by_id("uploadLink").click()
for i in range(60):
try:
if self.is_element_present(By.ID, "attachCV"): break
if self.is_element_present(By.ID, cvID): break
except: pass
time.sleep(1)
else: self.fail("time out")
driver.find_element_by_id("attachCV").clear()
driver.find_element_by_id(cvID).clear()
time.sleep(1)
driver.find_element_by_id("attachCV").send_keys(""C:\\Resume.pdf") #Update the Resume path
#Update the Resume path
driver.find_element_by_id(cvID).send_keys("C:\\Resume.pdf\\")
time.sleep(2)
driver.find_element_by_xpath("//button[@type='button']").click()
time.sleep(1)
Expand Down

0 comments on commit ed36849

Please sign in to comment.