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 |
I want to test a mobile software by an automation tool which is a IP telephony based software designed for both ios and android phone, basically this apps is develop for make call though few low cost audio codecs from Aircraft to Ground and Ground to Aircraft so anyone can suggest me which testing tool we can use for it
Can anybody would u like to tell the details of Automation Framework, with example. and also give preferable books. sites. Thanks in Advance.
What are the main attributes of test automation?
What is keyword driven automation?
How to integrate Rational functional Tester with Rational Quality manager. Can anyone provide the details steps giving explaination with examples.
How do you plan test automation?
can anyone suggest me any low cost tool that can support both Manual and Automation testing ?
Does automation replace manual testing?
Hi please tell me anything about sahi Automation tool....I felt it is good and understood the demo part...But while working i actually getting problem by often changing the port details....If anybody working on this...do let me know Thanx in advance
Explain me how to check if an element is visible on the page?
What are the tools used to test a Website? I need to advise my company. Please answer.
What skills needed to be a good test automator?