Monday, April 29, 2013

Naukri Job search automated - Part2

Find the original post here 'Naukri Job serach automated'.

We can even have the IDE search for jobs based on Job Category that is based on Functional Area/Department such as "Accounting Jobs", "Interior Design Jobs", "Bank Jobs", "Hotel Jobs" etc., and Industry/Sector such as "Agriculture Jobs", "Automobile Jobs", "FMCG Jobs" etc.

Observe the below commands to know how it works.


STEP1



Open the "Jobs by category" page in Naukri.

<tr>
    <td>open</td>
    <td>http://jobsearch.naukri.com/jobs-by-category</td>
    <td></td>
</tr>




STEP2
 

See the list of jobs and copy the name of the category/industry/sector and replace it at "link=Hotel Jobs" below. For example, if you copied a job category 'Testing Jobs' then replace it at "link=Testing Jobs".

Then the store command stores the category name in a variable 'url' then the storeAttribute command gets 'href' attribute value (a url of a new page with jobs specific to selected category) of the link (<a>) tag. Open command open the new page in the same window.

<tr>
    <td>store</td>
    <td>link=Hotel Jobs</td>
    <td>catName</td>
</tr>
<tr>
    <td>storeAttribute</td>
    <td>${catName}@href</td>
    <td>url</td>
</tr>
<tr>
    <td>open</td>
    <td>${url}</td>
    <td></td>
</tr>

More Info:
You might think that all the above three command can be replaced by click command to open that new window. Yes, but that opens the page in a new window and we again need to write lil complex code to pass all the remaining commands to that new window.





STEP3

Now, We got a page with many jobs and we want to refine our search by location, role, ctc, func area, industry etc etc. The below command code explained the way how we can choose them and refine our results to get most suitable jobs for us.

Refine Results by Freshness:


<tr>
    <td>click</td>
    <td>//div[@id='FreshnessClustertemplate']/div/div/a[3]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>

More info:
See the target of click command (//div[@id='FreshnessClustertemplate']/div/div/a[3]/b). Here a[3] indicates the 3rd check box which reads as "< 7 Days Old", you can replace it by 1 to 5 for "1 Day Old" to "<30 Day Old".


Refine Results by CTC

<tr>
    <td>click</td>
    <td>//div[@id='ctcClustertemplate']/div/div/a[2]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#ctcClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut &gt;

button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>

More info:
See the target of click command (//div[@id='ctcClustertemplate']/div/div/a[2]/b). Here a[2] indicates the 2rd checkbox which reads as "3-6 Lakhs", you can replace it by 1 to 6 for "0-3 Lakhs" to "25+ Lakhs".


Refine Results by Location

<tr>
    <td>click</td>
    <td>//div[@id='locationClustertemplate']/div/div/a[2]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#locationClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut &gt;

button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>


Refine Results by Role

<tr>
    <td>click</td>
    <td>//div[@id='roleClustertemplate']/div/div/a[2]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#roleClustertemplate &gt; div.mt10 &gt; span.loginBut &gt; button

[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>


Refine Results by Functional Area

<tr>
    <td>click</td>
    <td>//div[@id='fareaClustertemplate']/div/div/a[1]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#fareaClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut &gt;

button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>


Refine Results by Industry

<tr>
    <td>click</td>
    <td>//div[@id='industryClustertemplate']/div/div/a[2]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#industryClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut &gt;

button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>


Refine Results by Education

<tr>
    <td>click</td>
    <td>//div[@id='educationClustertemplate']/div/div/a[2]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#educationClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut

&gt; button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr>


Refine Results by Employer

<tr>
    <td>click</td>
    <td>//div[@id='TOJClustertemplate']/div/div/a[1]/b</td>
    <td></td>
</tr>
<tr>
    <td>clickAndWait</td>
    <td>css=#TOJClustertemplate &gt; div.cc.dspB &gt; div.mt10 &gt; span.loginBut &gt;

button[title=&quot;Refine results by all selections&quot;]</td>
    <td></td>
</tr> 


P.S : You can use the above refine results code based on your requirements, you may copy the relevant code in case you do not want to refine your search for any particular category.

No comments:

Post a Comment