Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated

  • Loading branch information...
commit 0e7707089543b8542d82e29a6123c63801f7100b 1 parent 61a3b02
Syed Sayem authored
10 pom.xml
View
@@ -51,8 +51,14 @@
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
- </dependency>
-
+ </dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ </dependency>
+
</dependencies>
44 src/test/java/com/excel/Reading_Writing_Excel.java
View
@@ -0,0 +1,44 @@
+package com.excel;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+
+public class Reading_Writing_Excel {
+
+
+ public static void main(String[] args) throws IOException {
+
+ // Creating a text file
+ File create = new File("C:\\Users\\Sayem\\Dropbox\\testing\\temp.txt");
+ create.createNewFile();
+
+ // Writing a text file
+ FileWriter write = new FileWriter("C:\\Users\\Sayem\\Dropbox\\testing\\temp.txt");
+ BufferedWriter out = new BufferedWriter(write);
+ out.write("hello we are writing in a file");
+ out.newLine();
+ out.write("This is a new line");
+ out.flush();
+
+ // Reading a text file
+ FileReader read = new FileReader("C:\\Users\\Sayem\\Dropbox\\testing\\temp.txt");
+ BufferedReader bfr = new BufferedReader(read);
+ String x ="";
+
+ //System.out.println(bfr.readLine());
+ //System.out.println(bfr.readLine());
+ //System.out.println(bfr.readLine());
+
+
+ while((x = bfr.readLine()) != null){
+ System.out.println(x);
+
+ }
+
+ }
+
+}
+
33 src/test/java/com/firefox/Firefox_Profile.java
View
@@ -0,0 +1,33 @@
+package com.firefox;
+
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxProfile;
+import org.openqa.selenium.firefox.internal.ProfilesIni;
+
+public class Firefox_Profile {
+
+ /**
+ * @param args
+ */
+ public static void main(String[] args) {
+ // TODO Auto-generated method stub
+
+ ProfilesIni allProfiles = new ProfilesIni ();
+ FirefoxProfile profile = allProfiles.getProfile("Sayem");
+
+ // Firefox Profile Manager
+ // Syeds-iMac:~ sayem$ Applications/Firefox.app/Contents/MacOS/firefox-bin -profilemanager
+
+ WebDriver driver = new FirefoxDriver(profile);
+
+ driver.get("http://www.gmail.com");
+ System.out.println("Titile is -- " +driver.getTitle() );
+ System.out.println("Current URL --"+ driver.getCurrentUrl() );
+ System.out.println("Page Source ----");
+ System.out.println(driver.getPageSource() );
+
+ driver.quit();
+
+ }
+}
BIN  target/WebDriver-0.0.1-SNAPSHOT.jar
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.