My Linux Stuff - Complete Blog For Linux Articles

My Linux Stuff - Complete Blog For Linux Articles

A Website For Complete Linux OS,Step by Step linux Installtion, Linux Tips and Tricks and Linux Stuff and so on... Connect and sharing here....

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

TOP 50 ENGINEERING COLLEGES IN INDIA 2014

This below survey was taken many form many colleges in India. These Top 50 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good.

Top 10 Government Engineering Colleges in India

Top 10 Government Engineering Colleges in India

These Government Engineering Colleges in India are really good for all kind of stuff like Education , research , Placement and New Innovation Ideas etc... But Getting seat in these colleges are heavy competition in students .....

Top 10 Colleges In India 2014

Top 10 Colleges In India 2014

Indian Institute Of Technology Delhi,Indian Institute Of Technology Bombay,Indian Institute Of Technology Kanpur,Indian Institute Of Technology Madras,Indian Institute Of Technology Kharagpur,Indian Institute Of Technology Roorkee,University Of Delhi,Indian Institute Of Technology Guwahati,University Of Calcutta,University Of Mumbai, National Institute Of Technology,Trichy.

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

2014 LATEST SURVEY TOP RANKING ENGINEERING COLLEGES IN INDIA

This below survey was taken many form many colleges in India. These Top 100 Engineering Colleges in India have Good Infrastructure, Good Environment, Educations , Staff, Placement , Research Activities and other Facilities are good. If you want to do Engineering as your dream and try out these colleges

Subscribe Now!

Enter your email address:

Wednesday, November 16, 2011

How to Fix Selenium popup alerts problem in Web Automation Testing


Selenium is popular framework that is being used with automation testing of webpages. But there is a problem that is being faced by the testing teams is it doesn’t support the handling of Popup or alert() boxes being called on onload() or onbeforeunload() event of browser. There’s workarounds exists like AutoIT etc. Special case seen for this is when we have Confirmation applied before navigating away from a page and selenium would fail to handle this and Automation will fail. One of my colleague was facing the same problem and he don’t want to use AutoIT. So I came with my own solution that can be used as fix and work well in handling the popups/alerts.
Environment: NUnit, Selenium, C#
The best way to deal with such alert box or popup is to use vbscript. It can identify the running window instance by its title and will send the “Enter” key to send ok.
The complete code for vbs will be:

Set oShell = CreateObject("WScript.Shell")
Set
 args = WScript.Arguments
arg1 = args.Item(0)
If oShell.AppActivate(arg1) Then
Wscript.Sleep 500
oShell.SendKeys "{ENTER}"
End 
If
Create a new vbs file copy & paste the above code save it.
Next step is to call the vbs file when you webpage is showing the alert/popup with ok/cancel (whatever) buttons. To call the vbs you need to change your methods calls in NUnit.
So create a function that can call the vbs as separate process asynchronously to open and wait for a while to open the page and alert box to appear. Copy and paste the below method code. The function will take title of the window as argument and call the vbs file. I’ve named the vbs file to auto.vbs here.
public Thread SimulateClickForConfirmation(string title)
{

//Simulate autoclick on IE windows
Thread th = new Thread(new ThreadStart(() => {
Thread.Sleep(1000);
Process script = new Process();
script.StartInfo.FileName = Environment.CurrentDirectory + "\\auto.vbs"
;
script.StartInfo.Arguments = title;
script.Start();
script.WaitForExit();
script.Close();
}));

th.Start();

return th;
}
Now you’ll call this function when you want to simulate the click for the alert or confirmation popup.
for e.g:
Thread th = pObj.SimulateClickForConfirmation(currentPage.Title);

//navigating away from the current page by clicking through selenium
selenium.Click(Someotherpage);

//abort the thread if previous statement gets executed
th.Abort();
This will activate the browser window and click on the alerts or confirmation box’s default button. I hope this would help our testing team facing such problems.

How to implement Custom Paging in ASP.Net GridView control


Require for Custom Pagination
ASP.Net GridView fetches all the records and then displays one page from the fetched records. Thus for illustration if your table has 1000 records and you want to display only 50 records per page, GridView will fetch all 1000 records throw away the 950 records and display the 50 records based on the page index selected by the users.

In Stored Procedure
SQL Server 2005 came up with the new ROW_NUMBER() keyword that allows us to give row numbers to the records that we select from the table. Using this row number we can apply our custom pagination logic within the SQL Server Stored Procedure.
I am using the Customers table Microsoft’s NorthWind Database for this article and below is the Stored Procedure that allows us to fetch records page wise.



Above I am passing the PageIndex, PageSize as input parameters so that we can get the records for the preferred page index. And for populating the Pager in front end we will need the total number of records in the table which we are fetching using the RecordCount parameter.
HTML Markup
The HTML markup is quite simple it has a GridView, a DropDownLists selecting the Page Size and a Repeater which will be used for populating the pager.

Implementing the Custom Pagination
Now let’s start implementing the custom pagination in the code behind. First you will need to import the following namespaces
C#
using System.Data.SqlClient;
using System.Configuration;
using System.Data;

VB.Net
Imports System.Data.SqlClient
Imports System.Configuration
Imports System.Data

Binding the GridView with Data
Below is the technique that will implement the stored procedure and bind the data to the ASP.Net GridView Control

Populating the Pager
In the last line of the above method we are calling the method described below to populate the pager Repeater control based on the record count that we fetch from the database






Below is the event that is raised when the Page Size DropDownList is changed. This method simply calls the GetCustomersPageWise() method.




At last the below event is executed when the page number LinkButton is clicked. This event makes a database call to get new set of records based on the PageIndex and PageSize



Synopsys recruiting freshers for intern position

Synopsys recruiting freshers for intern position.
Location: Hyderabad



Synopsys Logo


Requirments: 
1. B.tech. or M.tech in CSE/ECE or MCA with minimum of 60% marks.
2. Very good communication skills
3. Platform: Unix
4. Languages/tools: C/C++/Perl/Shell scripting/mySQL/Java scripting How to apply: 
To apply Go to --> http://goo.gl/QgE8E --> search openings-->
search with keyword '2552BR' and apply.

Fresher’s 2011: OFF CAMPUS RECRUITMENT

About Company

Leading independent t software testing company providing mission-critical software testing services to fortune clients, globally.


Job Description 
  1)      Adhere to Design standards and implement solutions in order to rectify programming errors.
2)      Engineer’s  and Non Engineers of 2011 passed outs
3)      Selected candidates are considered for the position of IT clients.
4)      Willing to work on day shift
5)      Immediate Joining
 STC V-Serve Pvt Ltd
Interested candidates walk in to below mentioned address November, 2011 between 9am – 7.30pm with your resumes
Pune
STQAC No:201, H.No-5, 2nd Floor, Tej House Building, M.G. Road, CAMP Pune - 411 001. Phone: 020 - 41280014, 020 - 41322204

MCA Freshers at Gold Plus Group


Candiates Should be MCA Fresher, ready to learn & support., knowledge of oracle, database, erp, good communication skills & analytical skill.
Oracle, database, erp, candidates residing in roorkee only apply




Eligibility MCA – Computers

Experience 0-1 Year

Location Roorkee, Uttarakhand


Mail ur CV to:
hr@goldplusgroup.com


Save Electricity

Database BackUp and Restore Script

For .Net developer a very common task is to take reguler backup and restore of SQL Server Database. Most of the time developer does that thru UI of Sql Server Management Studio. It is acully nice to know the Scripts which we can run and take backup and restore easily.


       To BackUp :-        
     BACKUP DATABASE [DatabaseName] TO DISK = 'C:\FileName.bak' WITH FORMAT
       To Restore :-
           RESTORE DATABASE [DatabaseName] FROM DISK = 'C:\FileName.bak'


Also when ever you do any database opration thru UI of Sql Server Management Studio you can always have look to the Script behind that opration. Its good practise to look at the script run by Sql Server to do any database realted opration. 

SAP Professional Fresher

Bharat Electronics Limited - BE/B.Tech requirements

Bharat Electronics Limited, India’s Premier Navaratna Defence Electronics Company
requires Electronics & Mechanical Engineerson Contract basis for a period of ONE
YEAR, for its MILITARY RADARS Strategic Business Unit in the Bangalore
Complex.


Requirements:
• Qualification: First Class Degree in BE/ B.Tech (Electronics / Electronics &
Communication , Electronics & Telecommunication & Mechanicaldisciplines)
and should have passed out from a recognized University / Institution not
earlier than 2008.

Remuneration: An all inclusive consolidated remuneration of Rs.12,000/- per
month .

Period of Contract: Initally One Year extendable to 2-3 years based on
Project Requirement & Individual Performance.

The requirement is in the areas of :
�� For Electronics & Communication Engineers : Testing / Development & Engineering
�� For Mechanical Engineers : :Development & Engineering /Production/ Quality Assurance

Preference will be given to those:
BE/ B.Tech (Electronics / Electronics & Communication , Electronics & Telecommunication) Engineerswith at least One Year Experience or Apprenticeship training in Testing & Installation in the field of RF /Communication, Networking . Candidates with knowledge / Work experience of Radars will be given preference.

BE/ B.Tech (Mechanical) Engineers with at least One Year Experience or Apprenticeship training preferably in the Engineering Industry or having experience in the relevant areas of Development & Engineering, Production and Quality Assurance will be preferred.

Applications should be downloaded & filled in application should be mailed to
hrmr@bel.co.in. Candidates short listed for the test will be informed through
E-mail regarding the date of the Interview.

Only applications submitted on or before 23.11.2011 will be entertained.

Check the below link for more details:
http://bel-india.com/images/itm-pdfs/8-Nov-2011-MR.pdf
http://bel-india.com/images/itm-pdfs/8-Nov-2011-MR-app-form.pdf

Fresher and Exp Walk-in in HPFS Bangalore

Java and .net Fresher Openings last date 16/17-11-2011


Amazing Wallpaper Images Colletion

Student Life

Most irritating moment: morning alarms..

Most difficult task: openin text books..

Most dreadful journey: way to coll on mondays..

Most lovely time: meeting frnds..

Most tragic: test in 1st period..

Most wonderful news: teacher is absent..

Most relaxing area: class room durin lectures..

Most funny moment: teacher says a joke&nobody laughs..

Tense moment: result came. .

Worst moment: last day of de final year..

Student lyf is d best.....

Like, if u agree..
COMMENT, any special moment u know!!

Related Posts Plugin for WordPress, Blogger...