Tuesday, May 27, 2014

How to upload resume in naukri.com

Note- here in the code just give the path of your file which you want to upload and run the code, it will upload your file in naukri.com. And Supported File Formats: doc, docx, rtf, pdf. Max file size: 300 Kb.
ex- path of the file which u want to upload = C:\\resume.doc

import java.util.Iterator;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class UploadResumeInNaukari {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        driver.get("http://www.naukri.com/");
       
        driver.findElement(By.xpath("//a[text()='Post Resume']")).click(); //click on post resume
       
        driver.switchTo().frame(driver.findElement(By.id("frmUpload"))); //browse button is under frame so 1st switch control to frame
        driver.findElement(By.id("browsecv")).sendKeys("path of the file which u want to upload");
       }
}


2 comments:

  1. can we use AutoIt tool for uploading the docs ?

    ReplyDelete
  2. works in the older version of Naukri.co

    ReplyDelete