In selenium testing how to connect with database , any one
pls give the entire information
Answers were Sorted based on User's Feedback
Answer / guest
Just create a java class for jdbc connection, call it when
you need to connect to database. to crate a jdbc connection
class please follow
http://www.roseindia.net/jdbc/jdbc-mysql/MysqlConnect.shtml
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sandip
public class dbconnection
{
public static void main(String args[])
{
String email;
String dbUrl = "jdbc:mysql://localhost:3306/test"; //This
URL is based on your IP address
String username="username"; //Default username is root
String password="password"; //Default password is root
String dbClass = "com.mysql.jdbc.Driver";
String query = "Select email from users where user_id = 1;";
try
{
Class.forName(dbClass);
Connection con = DriverManager.getConnection
(dbUrl,username,password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(query);
while (rs.next())
{
dbtime = rs.getString(1);
System.out.println(email);
} //end while
con.close();
} //end try
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
catch(SQLException e)
{
e.printStackTrace();
}
} //end main
} //end class
Is This Answer Correct ? | 2 Yes | 0 No |
On what basis you can map the success of automation testing?
Name a couple of standard web function found in the function generator?
What is Database Testing?
how to connect qtp to qc. what are the steps ?
Where will you maintain information like url, login, password?
what is 2 tier and 3 tier application.
1.Which functinalities of QTP using in onlinebanking system? 2.in lift which kind of testing you perform? 3.how do you test money is transform from one account to another account in online banking?
How to integrate Rational functional Tester with Rational Quality manager. Can anyone provide the details steps giving explaination with examples.
What is javascriptexecutor and in which cases javascriptexecutor will help in selenium automation?
Best Online Training For Tosca Test Suite?Good Online Training For Tosca Test Suite?
good faculty for selenium in hyderabad?
Hi Friends, I'm testing a SharePoint application by QTP 8.2 I face a problem that really difficult to me, please take a look on the description below: As you may know, SharePoint is an application is allow customize function from user, so that, user can add many web parts and put at any place they like. For ex: if there are two web parts existing in the SharePoint site When I using QTP to recognize a Web Table on any web part, it has the properties as "Index" and "html tag" only. Problem is: If there is any user changes the display of my web part, the "Index" of Web table is changed as well, so that QTP cannot identify exactly my object. Can anyone help me how to make that object as unique or another way to identify that web table object? Hope to receive many solutions from you. Thanks a lot.