├── .gitignore ├── test-output ├── old │ ├── Default suite │ │ ├── groups.html │ │ ├── Default test.properties │ │ ├── reporter-output.html │ │ ├── main.html │ │ ├── methods-not-run.html │ │ ├── index.html │ │ ├── methods.html │ │ ├── methods-alphabetical.html │ │ ├── classes.html │ │ ├── testng.xml.html │ │ └── toc.html │ └── index.html ├── failed.png ├── passed.png ├── skipped.png ├── collapseall.gif ├── bullet_point.png ├── navigator-bullet.png ├── testng.css ├── junitreports │ ├── TEST-Selenium.Calender.xml │ ├── TEST-Selenium.BasicAuth.xml │ └── TEST-Selenium.ActionsPractice.xml ├── testng-failed.xml ├── Default suite │ ├── testng-failed.xml │ ├── Default test.xml │ └── Default test.html ├── testng-results.xml ├── emailable-report.html ├── testng-reports2.js ├── testng-reports.js ├── testng-reports.css ├── testng-reports1.css ├── index.html └── jquery-3.4.1.min.js ├── practice.png ├── target └── classes │ ├── Java │ ├── G.class │ ├── ClassOne.class │ ├── Student.class │ ├── LoopConcept.class │ ├── ArrayConcept.class │ └── StringConcept.class │ ├── HomeWork │ └── Task.class │ ├── Modifier01 │ ├── Test.class │ ├── dafsd.class │ ├── ClassOne.class │ └── ClassTwo.class │ └── Modifier02 │ └── Test02.class ├── .settings ├── org.eclipse.m2e.core.prefs ├── org.eclipse.core.resources.prefs └── org.eclipse.jdt.core.prefs ├── src └── main │ └── java │ ├── Modifier01 │ ├── dafsd.java │ ├── ClassTwo.java │ ├── ClassOne.java │ └── Test.java │ ├── OOP1 │ ├── FDR.java │ ├── BB.java │ ├── DBBL.java │ └── Test.java │ ├── Modifier02 │ └── Test02.java │ ├── Java │ ├── ImmutableString.java │ ├── Student.java │ ├── ClassOne.java │ ├── LoopConcept.java │ ├── G.java │ ├── ArrayConcept.java │ ├── StringConcept.java │ └── Date.java │ ├── OOP2 │ ├── Qatar.java │ ├── Test.java │ └── Plane.java │ ├── Selenium │ ├── Env.properties │ ├── WDManager.java │ ├── BadSSL.java │ ├── LocatorsStrategy.java │ ├── ClassTwo.java │ ├── Hban.java │ ├── AutoSuggestiveDropDown.java │ ├── BootStrapDropDown.java │ ├── Frame.java │ ├── WebTable.java │ ├── TestNG.java │ ├── Calender.java │ ├── BasicAuth.java │ ├── TrickyDom.java │ ├── ActionsPractice.java │ └── ClassOne.java │ └── HomeWork │ └── Task.java ├── .project ├── .classpath └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | /target/ 2 | -------------------------------------------------------------------------------- /test-output/old/Default suite/groups.html: -------------------------------------------------------------------------------- 1 |

Groups used for this test run

-------------------------------------------------------------------------------- /test-output/old/Default suite/Default test.properties: -------------------------------------------------------------------------------- 1 | [SuiteResult context=Default test] -------------------------------------------------------------------------------- /practice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/practice.png -------------------------------------------------------------------------------- /test-output/old/Default suite/reporter-output.html: -------------------------------------------------------------------------------- 1 |

Reporter output

-------------------------------------------------------------------------------- /test-output/failed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/failed.png -------------------------------------------------------------------------------- /test-output/passed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/passed.png -------------------------------------------------------------------------------- /test-output/skipped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/skipped.png -------------------------------------------------------------------------------- /target/classes/Java/G.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/G.class -------------------------------------------------------------------------------- /test-output/collapseall.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/collapseall.gif -------------------------------------------------------------------------------- /test-output/bullet_point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/bullet_point.png -------------------------------------------------------------------------------- /test-output/navigator-bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/test-output/navigator-bullet.png -------------------------------------------------------------------------------- /.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /target/classes/HomeWork/Task.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/HomeWork/Task.class -------------------------------------------------------------------------------- /target/classes/Java/ClassOne.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/ClassOne.class -------------------------------------------------------------------------------- /target/classes/Java/Student.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/Student.class -------------------------------------------------------------------------------- /target/classes/Java/LoopConcept.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/LoopConcept.class -------------------------------------------------------------------------------- /target/classes/Modifier01/Test.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Modifier01/Test.class -------------------------------------------------------------------------------- /target/classes/Modifier01/dafsd.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Modifier01/dafsd.class -------------------------------------------------------------------------------- /target/classes/Java/ArrayConcept.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/ArrayConcept.class -------------------------------------------------------------------------------- /target/classes/Java/StringConcept.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Java/StringConcept.class -------------------------------------------------------------------------------- /target/classes/Modifier01/ClassOne.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Modifier01/ClassOne.class -------------------------------------------------------------------------------- /target/classes/Modifier01/ClassTwo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Modifier01/ClassTwo.class -------------------------------------------------------------------------------- /target/classes/Modifier02/Test02.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sourovbm21/TestingBEEJulySession/HEAD/target/classes/Modifier02/Test02.class -------------------------------------------------------------------------------- /src/main/java/Modifier01/dafsd.java: -------------------------------------------------------------------------------- 1 | package Modifier01; 2 | 3 | public class dafsd { 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /test-output/old/Default suite/main.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | Select a result on the left-hand pane. 3 | -------------------------------------------------------------------------------- /.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /src/main/java/OOP1/FDR.java: -------------------------------------------------------------------------------- 1 | package OOP1; 2 | 3 | public interface FDR { 4 | 5 | 6 | 7 | 8 | public void carloan(); 9 | public void healthLoan(); 10 | 11 | 12 | } 13 | -------------------------------------------------------------------------------- /test-output/old/Default suite/methods-not-run.html: -------------------------------------------------------------------------------- 1 |

Methods that were not run

2 | 3 | 4 |
Selenium.BasicAuth.basicAuthNotByPass
Selenium.BasicAuth.basicAuth
-------------------------------------------------------------------------------- /test-output/old/Default suite/index.html: -------------------------------------------------------------------------------- 1 | Results for Default suite 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/Modifier02/Test02.java: -------------------------------------------------------------------------------- 1 | package Modifier02; 2 | 3 | public class Test02 { 4 | 5 | 6 | 7 | public static void Hi(){ 8 | 9 | System.out.println("i am from different pakage "); 10 | 11 | } 12 | 13 | 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/Modifier01/ClassTwo.java: -------------------------------------------------------------------------------- 1 | package Modifier01; 2 | 3 | public class ClassTwo { 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | void CTwo(){ 13 | 14 | System.out.println("i am from Class two "); 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/Java/ImmutableString.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | public class ImmutableString { 4 | 5 | public static void main(String[] args) { 6 | 7 | 8 | String s ="abc"; 9 | String y ="abc"; 10 | System.out.println(s.concat(y)); 11 | s = s.concat(y); 12 | System.out.println(s); 13 | 14 | 15 | 16 | 17 | 18 | 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /test-output/testng.css: -------------------------------------------------------------------------------- 1 | .invocation-failed, .test-failed { background-color: #DD0000; } 2 | .invocation-percent, .test-percent { background-color: #006600; } 3 | .invocation-passed, .test-passed { background-color: #00AA00; } 4 | .invocation-skipped, .test-skipped { background-color: #CCCC00; } 5 | 6 | .main-page { 7 | font-size: x-large; 8 | } 9 | 10 | -------------------------------------------------------------------------------- /src/main/java/Java/Student.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | public class Student { 4 | 5 | String name ; 6 | int age ; 7 | String dept; 8 | 9 | 10 | 11 | //sourov //27 //science 12 | Student(String name, int age,String dept){ 13 | 14 | this.name = name; 15 | this.age = age; 16 | this.dept =dept; 17 | 18 | } 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-Selenium.Calender.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-output/junitreports/TEST-Selenium.BasicAuth.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/java/Modifier01/ClassOne.java: -------------------------------------------------------------------------------- 1 | package Modifier01; 2 | 3 | public class ClassOne { 4 | 5 | 6 | 7 | 8 | private int x=100; 9 | public int y=200; 10 | 11 | String s="sourov"; 12 | 13 | public static void Cone(){ 14 | 15 | System.out.println("i am from Class one "); 16 | 17 | } 18 | 19 | protected void prot(){ 20 | 21 | System.out.println("i am from Class one "); 22 | 23 | } 24 | 25 | 26 | 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/OOP2/Qatar.java: -------------------------------------------------------------------------------- 1 | package OOP2; 2 | 3 | public class Qatar extends Plane{ 4 | 5 | //Has-A relation 6 | 7 | 8 | 9 | Qatar (){ 10 | System.out.println("inside child class "); 11 | } 12 | 13 | 14 | 15 | public void enginge() { 16 | 17 | } 18 | 19 | @Override 20 | public void start() { 21 | 22 | 23 | } 24 | 25 | public void refuel() { 26 | System.out.println("@@@@@i am inside child refuel"); 27 | } 28 | 29 | 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/OOP2/Test.java: -------------------------------------------------------------------------------- 1 | package OOP2; 2 | 3 | public class Test { 4 | 5 | 6 | 7 | 8 | public static void main(String[] args) { 9 | 10 | 11 | Qatar qa = new Qatar(); 12 | 13 | qa.enginge(); 14 | qa.start(); 15 | qa.fuel(); 16 | qa.stop(); 17 | qa.fuel(); 18 | //qa.refuel(); 19 | 20 | Plane pa = new Qatar(); 21 | pa.fuel(); 22 | pa.start(); 23 | pa.stop(); 24 | pa.refuel(); 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/Selenium/Env.properties: -------------------------------------------------------------------------------- 1 | urlOne =https://rahulshettyacademy.com/AutomationPractice/ 2 | bad_SSL =https://expire.badssl.com/ 3 | aut_concept = http://the-internet.herokuapp.com/basic_auth 4 | j_Query =https://jqueryui.com/draggable/ 5 | s_hub = https://selectorshub.com/xpath-practice-page/ 6 | boot_Strap_Dropdown = https://www.jquery-az.com/boots/demo.php?ex=63.0_2 7 | Auto_S_D_D = https://www.amazon.co.uk/ 8 | E_List = https://www.flipkart.com/ 9 | browser=chrome 10 | url_php=https://www.phptravels.net/login 11 | username=user@phptravels.com 12 | password=demouser -------------------------------------------------------------------------------- /test-output/junitreports/TEST-Selenium.ActionsPractice.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-output/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | JulySession 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /test-output/Default suite/testng-failed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/main/java/OOP1/BB.java: -------------------------------------------------------------------------------- 1 | package OOP1; 2 | 3 | public interface BB { 4 | 5 | 6 | 7 | 8 | /* 9 | * no method body only method declaration. 10 | * not static method; 11 | * variable by default static. 12 | * can not create and object of an interface. 13 | * No costrutor; 14 | * 100% abstraction can be achieve. 15 | * 16 | */ 17 | 18 | int branch = 5; 19 | public void credit(); 20 | public void loan(); 21 | public void mortgage(); 22 | public void can_not_cell_doller(); 23 | public void can_accept_russian_rubel(); 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 7 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 8 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 9 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore 10 | org.eclipse.jdt.core.compiler.release=disabled 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /test-output/Default suite/Default test.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/main/java/Java/ClassOne.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | import java.time.LocalDateTime; 4 | import java.time.format.DateTimeFormatter; 5 | 6 | public class ClassOne { 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | public static void main(String[] args) { 19 | // TODO Auto-generated method stub 20 | 21 | int y=300000000; 22 | long ph=0000000000000000000000000000000000000000000000000l; 23 | String yy="Sourov"; 24 | 25 | 26 | LocalDateTime now = LocalDateTime.now(); 27 | DateTimeFormatter fm = DateTimeFormatter.ofPattern("dd/MM/yyyy"); 28 | System.out.println(fm.format(now)); 29 | 30 | 31 | 32 | } 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/OOP2/Plane.java: -------------------------------------------------------------------------------- 1 | package OOP2; 2 | 3 | public abstract class Plane { 4 | 5 | 6 | /* 7 | * Can have abstruct and no abastract method both. 8 | * Can't create an object 9 | * Can create constructor 10 | * 11 | */ 12 | 13 | 14 | Plane(){ 15 | System.out.println("inside parent class "); 16 | } 17 | 18 | 19 | public abstract void start (); 20 | 21 | public void stop() { 22 | System.out.println("i am inside Plane stop "); 23 | } 24 | 25 | 26 | public void fuel() { 27 | System.out.println("i am inside Plane fuel"); 28 | } 29 | 30 | public void refuel() { 31 | System.out.println("@@@@@@i am inside Plane refuel"); 32 | } 33 | 34 | 35 | 36 | 37 | 38 | 39 | } 40 | -------------------------------------------------------------------------------- /test-output/old/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Test results

6 | 7 | 8 | 9 |
SuitePassedFailedSkippedtestng.xml
Total100 
Default suite100Link
10 | -------------------------------------------------------------------------------- /test-output/old/Default suite/methods.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
22/10/22 12:56:25 0      basicAuthUsingUrimain@785570251
7 | -------------------------------------------------------------------------------- /test-output/old/Default suite/methods-alphabetical.html: -------------------------------------------------------------------------------- 1 |

Methods run, sorted chronologically

>> means before, << means after


Default suite

(Hover the method name to see the test class name)

2 | 3 | 4 | 5 | 6 |
TimeDelta (ms)Suite
configuration
Test
configuration
Class
configuration
Groups
configuration
Method
configuration
Test
method
ThreadInstances
22/10/22 12:56:25 0      basicAuthUsingUrimain@785570251
7 | -------------------------------------------------------------------------------- /test-output/old/Default suite/classes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
Class nameMethod nameGroups
Selenium.BasicAuth  
@Test
 basicAuth 
 basicAuthUsingUri 
 basicAuthNotByPass 
@BeforeClass
@BeforeMethod
@AfterMethod
@AfterClass
37 | -------------------------------------------------------------------------------- /src/main/java/OOP1/DBBL.java: -------------------------------------------------------------------------------- 1 | package OOP1; 2 | 3 | public class DBBL implements BB,FDR{ 4 | 5 | 6 | 7 | 8 | //if a class is implementing any interface then it is mandatory to define or override all methods of that interface. 9 | public void credit() { 10 | 11 | System.out.println("i am in credit method "); 12 | } 13 | 14 | public void loan() { 15 | System.out.println("i am in loan method "); 16 | 17 | } 18 | 19 | public void mortgage() { 20 | 21 | } 22 | 23 | public void homeloan() { 24 | 25 | } 26 | 27 | public void studentloan() { 28 | 29 | } 30 | 31 | public void can_not_cell_doller() { 32 | 33 | 34 | } 35 | 36 | public void can_accept_russian_rubel() { 37 | 38 | } 39 | 40 | public void carloan() { 41 | System.out.println("FROM fdr "); 42 | 43 | 44 | } 45 | 46 | public void healthLoan() { 47 | 48 | 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /test-output/testng-results.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/Selenium/WDManager.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import org.openqa.selenium.WebDriver; 4 | import org.openqa.selenium.chrome.ChromeDriver; 5 | 6 | import io.github.bonigarcia.wdm.WebDriverManager; 7 | 8 | public class WDManager { 9 | 10 | public static void main(String[] args) { 11 | 12 | 13 | 14 | 15 | 16 | WebDriverManager.chromedriver().cachePath("/Users/tohidur/Desktop/MyChromeDriver").avoidOutputTree().setup(); 17 | //System.setProperty("webdriver.chrome.driver","/Users/tohidur/Desktop/MyChromeDriver/chromedriver"); 18 | //WebDriverManager.chromedriver().cachePath("/Users/tohidur/Desktop/MyChromeDriver").avoidBrowserDetection().setup(); 19 | //System.setProperty("webdriver.chrome.driver","/Users/tohidur/Desktop/MyChromeDriver/chromedriver/mac64/107.0.5304.62/chromedriver"); 20 | 21 | 22 | WebDriver driver = new ChromeDriver(); 23 | driver.get("https://www.google.co.uk/"); 24 | String title = driver.getTitle(); 25 | System.out.println(title); 26 | 27 | 28 | 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /test-output/old/Default suite/testng.xml.html: -------------------------------------------------------------------------------- 1 | testng.xml for Default suite<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="Default suite" guice-stage="DEVELOPMENT">
  <test thread-count="5" name="Default test" verbose="2">
    <classes>
      <class name="Selenium.BasicAuth">
        <methods>
          <include name="basicAuthUsingUri"/>
        </methods>
      </class> <!-- Selenium.BasicAuth -->
    </classes>
  </test> <!-- Default test -->
</suite> <!-- Default suite -->
-------------------------------------------------------------------------------- /src/main/java/Modifier01/Test.java: -------------------------------------------------------------------------------- 1 | package Modifier01; 2 | 3 | import java.util.Date; 4 | import java.util.Random; 5 | 6 | public class Test extends ClassOne{ 7 | 8 | 9 | 10 | public static void main(String[] args) { 11 | 12 | 13 | //ClassOne classone = new ClassOne(); 14 | 15 | ClassOne.Cone(); 16 | System.out.print(":-> "); 17 | Modifier02.Test02.Hi(); 18 | 19 | 20 | Test test = new Test(); 21 | 22 | test.prot(); 23 | 24 | 25 | 26 | 27 | System.out.println("i am sourov"); 28 | 29 | 30 | for ( int i= 1; i <=100;i++ ) { 31 | 32 | System.out.println("i am sourov :--> "+i); 33 | 34 | if (i % 2 ==0 ) { 35 | System.out.println("i am a even number:--> "+i); 36 | } 37 | } 38 | 39 | 40 | int s=5; 41 | while (s <= 5) { 42 | System.out.println("i am less then 5 "); 43 | break; 44 | } 45 | 46 | 47 | 48 | // 49 | // 50 | // ClassTwo classtwo =new ClassTwo(); 51 | // 52 | // classtwo.CTwo(); 53 | 54 | Date D = new Date(); 55 | D.getDate(); 56 | System.out.println(D.getDate()); 57 | System.out.println(D); 58 | 59 | Random r = new Random(); 60 | 61 | 62 | 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/main/java/OOP1/Test.java: -------------------------------------------------------------------------------- 1 | package OOP1; 2 | 3 | public class Test { 4 | 5 | 6 | 7 | 8 | 9 | public static void main(String[] args) { 10 | 11 | 12 | // WebDriver driver = new ChromeDriver(); 13 | 14 | //ChromeDriver driver = new ChromeDriver(); 15 | 16 | DBBL dbbL = new DBBL();//Static polymorphism 17 | 18 | //all the object of dbbL class will be accessible 19 | dbbL.credit(); 20 | dbbL.credit(); 21 | dbbL.carloan(); 22 | dbbL.can_accept_russian_rubel(); 23 | dbbL.can_not_cell_doller(); 24 | dbbL.healthLoan(); 25 | dbbL.homeloan(); 26 | dbbL.loan(); 27 | dbbL.mortgage(); 28 | dbbL.studentloan(); 29 | 30 | // 31 | //child class object can be referred by parent interface/class referred variable. 32 | //Only overridden method will be accessible 33 | 34 | BB bb = new DBBL();//Dynamic polymorphism//Runtime // Top casting 35 | 36 | 37 | 38 | // 39 | FDR fdr = new DBBL(); 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | //Abstraction 49 | /* 50 | * inter 51 | * abs class 52 | */ 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/Selenium/BadSSL.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | import org.openqa.selenium.chrome.ChromeOptions; 8 | import org.openqa.selenium.firefox.FirefoxDriver; 9 | 10 | import io.github.bonigarcia.wdm.WebDriverManager; 11 | 12 | public class BadSSL { 13 | 14 | public static void main(String[] args) { 15 | 16 | 17 | 18 | ChromeOptions cop = new ChromeOptions(); 19 | //cop.setAcceptInsecureCerts(true); 20 | WebDriverManager.chromedriver().setup(); 21 | WebDriver driver = new ChromeDriver(cop); 22 | 23 | // WebDriverManager.firefoxdriver().setup(); 24 | // WebDriver driver = new FirefoxDriver(); 25 | 26 | // WebDriverManager.edgedriver().setup(); 27 | // WebDriver driver = new EdgeDriver(); 28 | 29 | driver.manage().window().maximize(); 30 | driver.manage().deleteAllCookies(); 31 | driver.manage().timeouts().pageLoadTimeout(6000l, TimeUnit.SECONDS); 32 | driver.manage().timeouts().implicitlyWait(3000l, TimeUnit.SECONDS); 33 | driver.get("https://expire.badssl.com/"); 34 | 35 | /// 36 | 37 | 38 | 39 | 40 | 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/Java/LoopConcept.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collections; 5 | import java.util.List; 6 | 7 | public class LoopConcept { 8 | 9 | public static void main(String[] args) { 10 | 11 | 12 | //For loop 13 | 14 | 15 | 16 | //While Loop 17 | //While loop condition has to be true and only accept only one arguments. 18 | 19 | int i=1; int n=5; 20 | 21 | while (i<=n) { 22 | System.out.println(i); 23 | 24 | i++; //i=i+1; 25 | 26 | 27 | } 28 | 29 | 30 | 31 | //Do while Loop 32 | System.out.println("inside the do while loop "); 33 | 34 | int x=1; int y=5; 35 | 36 | 37 | do { 38 | 39 | System.out.println(x); 40 | x++;//x = x+1; 41 | 42 | }while (x<=y); 43 | 44 | 45 | List al = new ArrayList(); 46 | al.add("january"); 47 | al.add("February"); 48 | al.add("March"); 49 | al.add("December"); 50 | System.out.println(al); 51 | Collections.sort(al); 52 | System.out.println(al); 53 | List a = new ArrayList(); 54 | a.add(1); 55 | a.add(7); 56 | a.add(3); 57 | a.add(8); 58 | 59 | System.out.println(a); 60 | Collections.sort(a); 61 | System.out.println(a); 62 | 63 | 64 | 65 | 66 | 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/Selenium/LocatorsStrategy.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | public class LocatorsStrategy { 4 | 5 | // tag[attr='value'] 6 | // input[name='email'] -- css 7 | // input[@name='email'] -- xpath 8 | 9 | // xpath vs css: 10 | // 1. syntax: css is btr than xpath 11 | // 2. backward: xpath 12 | // 3. siblings: xpath 13 | // 4. webtable: xpath 14 | // 5. comma: css 15 | // 6. text: xpath 16 | // 7. dynamic: both 17 | // 8. SVG Elements: xpath 18 | // 9. shadow dom : css selector 19 | // 10. index: both 20 | // 11. Relative Locators 21 | 22 | //CSS child to parent: NA 23 | // backward traversing in CSS: NA 24 | 25 | // xpath axes: 26 | // input[@name='email'] -- xpath 27 | 28 | // parent to child: 29 | // form[@id='hs-login']//input[@id='username'] 30 | // div[@class='private-form__input-wrapper']/input[@id='username'] 31 | // div[@class='private-form__input-wrapper']/child::input[@id='username'] 32 | // select[@id='Form_submitForm_Country']/option 33 | // select[@id='Form_submitForm_Country']/child::option 34 | 35 | // child to parent: 36 | // backward traversing in xpath: 37 | // input[@id='username']/../../../../../../../../../.. 38 | // input[@id='username']/parent::div 39 | 40 | // child to ancestor: 41 | // input[@id='username']/ancestor::form 42 | 43 | } 44 | -------------------------------------------------------------------------------- /test-output/old/Default suite/toc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Results for Default suite 4 | 5 | 6 | 7 | 8 |

Results for
Default suite

9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | 20 | 21 | 22 |
1 test1 class1 method:
14 |   chronological
15 |   alphabetical
16 |   not run (2)
0 groupreporter outputtestng.xml
23 | 24 |

29 |

25 |
Default test (1/0/0) 26 | Results 27 |
28 |
30 | -------------------------------------------------------------------------------- /src/main/java/Selenium/ClassTwo.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.WebDriver; 6 | import org.openqa.selenium.chrome.ChromeDriver; 7 | 8 | import io.github.bonigarcia.wdm.WebDriverManager; 9 | 10 | public class ClassTwo { 11 | 12 | public static void main(String[] args) throws InterruptedException { 13 | 14 | 15 | WebDriverManager.chromedriver().setup(); 16 | WebDriver driver = new ChromeDriver(); 17 | 18 | // WebDriverManager.firefoxdriver().setup(); 19 | // WebDriver driver = new FirefoxDriver(); 20 | // WebDriverManager.edgedriver().setup(); 21 | // WebDriver driver = new EdgeDriver(); 22 | 23 | driver.manage().window().maximize(); 24 | driver.manage().deleteAllCookies(); 25 | driver.manage().timeouts().pageLoadTimeout(6000l, TimeUnit.SECONDS); 26 | driver.manage().timeouts().implicitlyWait(3000l, TimeUnit.SECONDS); 27 | driver.get("https://www.google.co.uk/"); 28 | Thread.sleep(3000); 29 | driver.navigate().to("https://en-gb.facebook.com/"); 30 | Thread.sleep(3000); 31 | driver.navigate().back(); 32 | Thread.sleep(3000); 33 | driver.navigate().forward(); 34 | Thread.sleep(3000); 35 | driver.navigate().refresh(); 36 | Thread.sleep(3000); 37 | driver.quit(); 38 | 39 | 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/Selenium/Hban.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import org.openqa.selenium.By; 4 | import org.openqa.selenium.WebDriver; 5 | import org.openqa.selenium.chrome.ChromeDriver; 6 | import org.testng.annotations.Test; 7 | 8 | import io.github.bonigarcia.wdm.WebDriverManager; 9 | 10 | public class Hban { 11 | 12 | @Test 13 | 14 | public void hban() { 15 | // 16 | WebDriverManager.chromedriver().setup(); 17 | WebDriver driver = new ChromeDriver(); 18 | driver.get("https://smsreceivefree.com/info/19175903978/"); 19 | String s = driver.findElement(By.xpath("(//*[contains(text(),'Valley Bank Access Code')])[1]")).getText(); 20 | // Valley Bank Access Code. Your access code is 241455. Reply HELP for help 21 | System.out.println("Just Printing AfterGetText Method : "+ s); 22 | System.out.println("i am from method : "+givenCode(s)); 23 | //driver.findElement(By.xpath("")).sendKeys(givenCode(s)); 24 | driver.quit(); 25 | 26 | } 27 | 28 | 29 | public String givenCode (String str ) { 30 | //str.trim(); 31 | String S[] = str.trim().split("is"); 32 | //String first = S[0]; 33 | String second = S[1]; 34 | //second.trim(); 35 | String secondTrim[] = second.trim().split(" "); 36 | String sSecond = secondTrim[0]; 37 | String actual = sSecond.trim().substring(0, sSecond.length() - 1); 38 | return actual ; 39 | 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | July 7 | Session 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | Session 12 | http://maven.apache.org 13 | 14 | 15 | UTF-8 16 | 1.8 17 | 1.8 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | org.seleniumhq.selenium 28 | selenium-java 29 | 4.5.2 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | org.testng 38 | testng 39 | 7.6.1 40 | test 41 | 42 | 43 | 44 | 45 | 46 | io.github.bonigarcia 47 | webdrivermanager 48 | 5.2.3 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/main/java/Selenium/AutoSuggestiveDropDown.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.List; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | import org.openqa.selenium.By; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.chrome.ChromeDriver; 10 | 11 | import io.github.bonigarcia.wdm.WebDriverManager; 12 | 13 | public class AutoSuggestiveDropDown { 14 | 15 | public static void main(String[] args) throws InterruptedException { 16 | 17 | WebDriverManager.chromedriver().setup(); 18 | WebDriver driver = new ChromeDriver(); 19 | driver.manage().window().maximize(); 20 | driver.manage().deleteAllCookies(); 21 | driver.manage().timeouts().pageLoadTimeout(4, TimeUnit.SECONDS); 22 | driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); 23 | driver.get("https://www.flipkart.com/"); 24 | Thread.sleep(2000l); 25 | driver.findElement(By.xpath("//div[@class='_2QfC02']/button")).click(); 26 | driver.findElement(By.xpath("//input[@class='_3704LK']")).sendKeys("iphone"); 27 | List totlList = driver.findElements(By.xpath("//div[contains(@class,'lrtEPN _17d0yO')]")); 28 | 29 | for (int i=0;i list = driver.findElements(By.xpath("//ul[contains(@class,'multiselect')]//li")); 27 | 28 | for (int i=0;i totalFrame = driver.findElements(By.tagName("iframe")); 28 | totalFrame.size(); 29 | System.out.println("total frame "+totalFrame.size()); 30 | 31 | // driver.switchTo().frame(0); 32 | // driver.switchTo().frame(0); 33 | driver.switchTo().frame(frame); 34 | 35 | WebElement Source = driver.findElement(By.xpath("//*[@id='draggable']")); 36 | WebElement target = driver.findElement(By.id("droppable")); 37 | Actions ac = new Actions(driver); 38 | ac.dragAndDrop(Source, target).build().perform(); 39 | driver.switchTo().defaultContent(); 40 | driver.findElement(By.xpath("//*[text()='Draggable']")).click(); 41 | 42 | 43 | try { 44 | Thread.sleep(4000); 45 | } catch (InterruptedException e) { 46 | // TODO Auto-generated catch block 47 | e.printStackTrace(); 48 | } 49 | driver.quit(); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/Java/G.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | import java.util.List; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | import org.openqa.selenium.By; 7 | import org.openqa.selenium.JavascriptExecutor; 8 | import org.openqa.selenium.WebDriver; 9 | import org.openqa.selenium.WebElement; 10 | import org.openqa.selenium.chrome.ChromeDriver; 11 | import org.testng.Assert; 12 | import org.testng.annotations.AfterMethod; 13 | import org.testng.annotations.BeforeMethod; 14 | import org.testng.asserts.SoftAssert; 15 | 16 | import io.github.bonigarcia.wdm.WebDriverManager; 17 | 18 | public class G { 19 | 20 | 21 | public static void main(String[] args) throws InterruptedException { 22 | 23 | WebDriverManager.chromedriver().setup(); 24 | WebDriver driver = new ChromeDriver(); 25 | driver.manage().window().maximize(); 26 | driver.manage().deleteAllCookies(); 27 | driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); 28 | driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 29 | driver.get("https://www.spicejet.com/"); 30 | 31 | driver.findElement(By.xpath("//*[contains(text(),'Passengers')]")).click(); 32 | driver.findElement(By.xpath("(//*[@class='css-1dbjc4n r-18u37iz r-1wtj0ep r-1x0uki6'])[1]//div[@data-focusable]")).click(); 33 | Thread.sleep(4000); 34 | driver.findElement(By.xpath("(//*[@class='css-1dbjc4n r-18u37iz r-1wtj0ep r-1x0uki6'])[2]//div[@data-focusable]")).click(); 35 | Thread.sleep(4000); 36 | driver.findElement(By.xpath("(//*[@class='css-1dbjc4n r-18u37iz r-1wtj0ep r-1x0uki6'])[3]//div[@data-focusable]")).click(); 37 | Thread.sleep(4000); 38 | driver.quit(); 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | } 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | } 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/main/java/Selenium/WebTable.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.List; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.JavascriptExecutor; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.chrome.ChromeDriver; 10 | import org.openqa.selenium.interactions.Actions; 11 | 12 | import io.github.bonigarcia.wdm.WebDriverManager; 13 | 14 | public class WebTable { 15 | 16 | public static void main(String[] args) throws InterruptedException { 17 | 18 | 19 | 20 | 21 | WebDriverManager.chromedriver().setup(); 22 | WebDriver driver = new ChromeDriver(); 23 | driver.get("https://qavbox.github.io/demo/webtable/"); 24 | driver.manage().window().maximize(); 25 | JavascriptExecutor js =(JavascriptExecutor)driver; 26 | Actions action = new Actions(driver); 27 | WebElement tillView = driver.findElement(By.id("table02")); 28 | js.executeScript("arguments[0].scrollIntoView();",tillView); 29 | List totallist = driver.findElements(By.xpath("//table[@id='table02']//tr//td[2]")); 30 | 31 | //js.executeScript("document.querySelector('#table02').scrollTop=200"); 32 | Thread.sleep(3000); 33 | // js.executeScript("document.querySelector('#table02').scrollBy(0,400)"); 34 | 35 | for(WebElement list :totallist ) { 36 | list.getText(); 37 | //js.executeScript("document.querySelector('#table02').scrollTop=200"); 38 | // Thread.sleep(2000); 39 | js.executeScript("document.querySelector('#table02').scrollBy(0,400)"); 40 | // Thread.sleep(2000); 41 | System.out.println(list.getText()); 42 | if (list.getText().equals("Senior Marketing Designer")) { 43 | // Thread.sleep(2000); 44 | action.moveToElement(list).contextClick().build().perform(); 45 | Thread.sleep(2000); 46 | System.out.println(" @---->> "+"i am clicking to given element"); 47 | break; 48 | 49 | } 50 | } 51 | 52 | 53 | 54 | Thread.sleep(2000); 55 | driver.quit(); 56 | 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /test-output/emailable-report.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | TestNG Report 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
Test# Passed# Skipped# Retried# FailedTime (ms)Included GroupsExcluded Groups
Default suite
Default test10006,489
14 | 15 |
ClassMethodStartTime (ms)
Default suite
Default test — passed
Selenium.BasicAuthbasicAuthUsingUri16664397854656436
16 |

Default test

Selenium.BasicAuth#basicAuthUsingUri

back to summary

17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/java/Selenium/TestNG.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import org.testng.Assert; 4 | import org.testng.annotations.AfterClass; 5 | import org.testng.annotations.AfterMethod; 6 | import org.testng.annotations.AfterSuite; 7 | import org.testng.annotations.AfterTest; 8 | import org.testng.annotations.BeforeClass; 9 | import org.testng.annotations.BeforeMethod; 10 | import org.testng.annotations.BeforeSuite; 11 | import org.testng.annotations.BeforeTest; 12 | import org.testng.annotations.Test; 13 | 14 | public class TestNG { 15 | 16 | 17 | @BeforeSuite 18 | public void setup_Before_Suite() { 19 | System.out.println("inside before suite"); 20 | } 21 | 22 | 23 | 24 | @BeforeTest 25 | public void setup_Before_Test() { 26 | System.out.println("inside before test"); 27 | } 28 | 29 | 30 | @BeforeClass 31 | public void setup_Before_Class() { 32 | System.out.println("inside before class"); 33 | } 34 | 35 | 36 | @BeforeMethod 37 | public void setup() { 38 | System.out.println("inside before method"); 39 | } 40 | 41 | 42 | 43 | @Test 44 | public void dropDownTest() { 45 | 46 | System.out.println("inside test method"); 47 | } 48 | 49 | @Test(groups="somke",priority=1) 50 | public void dropDownTestTwo() { 51 | 52 | System.out.println("inside test method "); 53 | } 54 | @Test(groups="somke",dependsOnMethods = "dropDownTestFour") 55 | public void dropDownTestThree() { 56 | 57 | System.out.println("inside test method #######"); 58 | } 59 | 60 | @Test() 61 | public void dropDownTestFour() { 62 | 63 | System.out.println("inside test method @@@@@@ "); 64 | //Assert.assertTrue(false); 65 | } 66 | 67 | 68 | @AfterMethod 69 | public void setup_After() { 70 | System.out.println("inside after method"); 71 | } 72 | 73 | 74 | @AfterClass 75 | public void setup_After_Class() { 76 | System.out.println("inside after class"); 77 | } 78 | 79 | @AfterTest 80 | public void setup_After_Test() { 81 | System.out.println("inside after test"); 82 | } 83 | 84 | @AfterSuite 85 | public void setup_After_Suite() { 86 | System.out.println("inside after suite"); 87 | } 88 | 89 | 90 | 91 | 92 | 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/Selenium/Calender.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.List; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | import org.openqa.selenium.By; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.chrome.ChromeDriver; 10 | import org.testng.annotations.Test; 11 | 12 | import io.github.bonigarcia.wdm.WebDriverManager; 13 | 14 | public class Calender { 15 | 16 | 17 | 18 | 19 | 20 | 21 | @Test 22 | public void getCalender() throws InterruptedException { 23 | WebDriverManager.chromedriver().setup(); 24 | WebDriver driver = new ChromeDriver(); 25 | driver.manage().window().maximize(); 26 | driver.manage().deleteAllCookies(); 27 | driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS); 28 | driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); 29 | driver.get("http://seleniumpractise.blogspot.com/2016/08/how-to-handle-calendar-in-selenium.html"); 30 | driver.findElement(By.id("datepicker")).click(); 31 | 32 | String actualYear = driver.findElement(By.className("ui-datepicker-title")).getText(); 33 | // September 2022 34 | System.out.println(actualYear); 35 | String month = actualYear.split(" ")[0].trim(); 36 | String year = actualYear.split(" ")[1].trim(); 37 | 38 | while (!(month.equals("December") && year.equals("2025"))) {// 06/20/2023 39 | driver.findElement(By.xpath("//a[@title='Next']")).click(); 40 | actualYear = driver.findElement(By.className("ui-datepicker-title")).getText(); 41 | month = actualYear.split(" ")[0].trim(); 42 | year = actualYear.split(" ")[1].trim(); 43 | 44 | } 45 | driver.findElement(By.xpath("//a[text()='31']")).click(); 46 | 47 | Thread.sleep(4000); 48 | // List dates = driver.findElements(By.cssSelector(".ui-state-default")); 49 | // for(int i=0;i 2 | 3 | TestNG: Default test 4 | 5 | 6 | 7 | 11 | 53 | 54 | 55 | 56 |

Default test

57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 |
Tests passed/Failed/Skipped:1/0/0
Started on:Sat Oct 22 12:56:25 BST 2022
Total time:6 seconds (6489 ms)
Included groups:
Excluded groups:

69 | (Hover the method name to see the test class name)

70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 |
PASSED TESTS
Test methodExceptionTime (seconds)Instance
basicAuthUsingUri
Test class: Selenium.BasicAuth
6Selenium.BasicAuth@34f5090e

83 | 84 | -------------------------------------------------------------------------------- /src/main/java/Selenium/BasicAuth.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.time.Duration; 4 | import java.util.concurrent.TimeUnit; 5 | import java.util.function.Supplier; 6 | 7 | import org.openqa.selenium.By; 8 | import org.openqa.selenium.Credentials; 9 | import org.openqa.selenium.HasAuthentication; 10 | import org.openqa.selenium.UsernameAndPassword; 11 | import org.openqa.selenium.WebDriver; 12 | import org.openqa.selenium.chrome.ChromeDriver; 13 | import org.testng.Assert; 14 | import org.testng.annotations.Test; 15 | import java.net.URI; 16 | import java.util.function.Predicate; 17 | 18 | import io.github.bonigarcia.wdm.WebDriverManager; 19 | 20 | public class BasicAuth { 21 | 22 | @Test 23 | public void basicAuth() { 24 | WebDriverManager.chromedriver().setup(); 25 | WebDriver driver = new ChromeDriver(); 26 | driver.manage().window().maximize(); 27 | driver.manage().deleteAllCookies(); 28 | driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(3000)); 29 | driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2000)); 30 | driver.get("http://admin:admin@the-internet.herokuapp.com/basic_auth"); 31 | boolean b = driver.findElement(By.xpath("//p[contains(text(),'Congratulations')]")).isDisplayed(); 32 | Assert.assertTrue(b); 33 | } 34 | 35 | @Test 36 | public void basicAuthNotByPass() { 37 | WebDriverManager.chromedriver().setup(); 38 | WebDriver driver = new ChromeDriver(); 39 | driver.manage().window().maximize(); 40 | driver.manage().deleteAllCookies(); 41 | driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(2000)); 42 | driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2000)); 43 | driver.get("http://the-internet.herokuapp.com/basic_auth"); 44 | boolean b = driver.findElement(By.xpath("//p[contains(text(),'Congratulations')]")).isDisplayed(); 45 | Assert.assertTrue(b); 46 | } 47 | 48 | @Test 49 | public void basicAuthUsingUriPredicate() { 50 | WebDriverManager.chromedriver().setup(); 51 | WebDriver driver = new ChromeDriver(); 52 | driver.manage().window().maximize(); 53 | driver.manage().deleteAllCookies(); 54 | driver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(2000)); 55 | driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(2000)); 56 | Predicate uriPredicate = uri -> uri.getHost().contains("the-internet.herokuapp.com"); 57 | ((HasAuthentication) driver).register(uriPredicate, UsernameAndPassword.of("admin", "admin")); 58 | driver.get("http://the-internet.herokuapp.com/basic_auth"); 59 | 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/Selenium/TrickyDom.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.List; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | import org.openqa.selenium.By; 7 | import org.openqa.selenium.JavascriptExecutor; 8 | import org.openqa.selenium.Keys; 9 | import org.openqa.selenium.WebDriver; 10 | import org.openqa.selenium.WebElement; 11 | import org.openqa.selenium.chrome.ChromeDriver; 12 | import org.openqa.selenium.interactions.Actions; 13 | 14 | import io.github.bonigarcia.wdm.WebDriverManager; 15 | 16 | public class TrickyDom { 17 | 18 | public static void main(String[] args) throws InterruptedException { 19 | 20 | 21 | WebDriverManager.chromedriver().setup(); 22 | WebDriver driver = new ChromeDriver(); 23 | driver.manage().window().maximize(); 24 | driver.manage().deleteAllCookies(); 25 | driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS); 26 | driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); 27 | driver.get("https://selectorshub.com/xpath-practice-page/"); 28 | List frame = driver.findElements(By.tagName("iframe")); 29 | System.out.println("total number of frame :--> "+frame.size()); 30 | WebElement scrollview = driver.findElement(By.xpath("//button[text()='Checkout here']")); 31 | 32 | JavascriptExecutor js = (JavascriptExecutor)driver; 33 | js.executeScript("arguments[0].scrollIntoView();", scrollview); 34 | //entering into iframe. 35 | driver.switchTo().frame("pact"); 36 | 37 | //Entering First Open Shadow root 38 | WebElement elementTea = (WebElement) js 39 | .executeScript("return document.querySelector(\"#snacktime\").shadowRoot.querySelector(\"#tea\")"); 40 | String elementTeaValue = "arguments[0].setAttribute('value','Love Green Tea')"; 41 | js.executeScript(elementTeaValue, elementTea); 42 | Thread.sleep(3000); 43 | // Entering Second Open Shadow root 44 | WebElement elementLunch = (WebElement) js 45 | .executeScript("return document.querySelector(\"#snacktime\").shadowRoot.querySelector(\"#app2\")" 46 | + ".shadowRoot.querySelector(\"#pizza\")"); 47 | String lunchItemValue = "arguments[0].setAttribute('value','Chicken Tikka Masala Please')"; 48 | js.executeScript(lunchItemValue, elementLunch); 49 | //Exit from iframe 50 | driver.switchTo().defaultContent(); 51 | //Entering Second Closed Shadow root 52 | driver.findElement(By.xpath("//div[@id='userPass']")).click(); 53 | Actions ac = new Actions(driver); 54 | ac.sendKeys(Keys.TAB).perform(); 55 | ac.sendKeys("PASSWORD").perform(); 56 | 57 | 58 | Thread.sleep(3000); 59 | driver.quit(); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/Selenium/ActionsPractice.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.util.concurrent.TimeUnit; 4 | 5 | import org.openqa.selenium.By; 6 | import org.openqa.selenium.Keys; 7 | import org.openqa.selenium.WebDriver; 8 | import org.openqa.selenium.WebElement; 9 | import org.openqa.selenium.chrome.ChromeDriver; 10 | import org.openqa.selenium.interactions.Actions; 11 | import org.testng.annotations.Test; 12 | 13 | import io.github.bonigarcia.wdm.WebDriverManager; 14 | 15 | public class ActionsPractice { 16 | 17 | 18 | 19 | 20 | 21 | @Test 22 | public void testOne() throws InterruptedException { 23 | 24 | WebDriverManager.chromedriver().setup(); 25 | WebDriver driver = new ChromeDriver(); 26 | driver.manage().window().maximize(); 27 | driver.manage().deleteAllCookies(); 28 | driver.manage().timeouts().pageLoadTimeout(6, TimeUnit.SECONDS); 29 | driver.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS); 30 | driver.get("https://www.amazon.co.uk/"); 31 | 32 | Actions action = new Actions(driver); 33 | 34 | WebElement element = driver.findElement(By.id("nav-search-bar-form")); 35 | action.keyDown(element,Keys.SHIFT).sendKeys("hello").perform(); 36 | 37 | action.keyDown(Keys.CONTROL).sendKeys(Keys.END).perform(); 38 | Thread.sleep(2000); 39 | action.keyDown(Keys.CONTROL).sendKeys(Keys.HOME).perform(); 40 | 41 | 42 | Thread.sleep(2000); 43 | driver.quit(); 44 | 45 | 46 | 47 | } 48 | @Test (priority=0) 49 | public void testTwo() throws InterruptedException { 50 | 51 | WebDriverManager.chromedriver().setup(); 52 | WebDriver driver = new ChromeDriver(); 53 | driver.manage().window().maximize(); 54 | driver.manage().deleteAllCookies(); 55 | driver.manage().timeouts().pageLoadTimeout(6, TimeUnit.SECONDS); 56 | driver.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS); 57 | driver.get("https://parabank.parasoft.com/parabank/register.htm"); 58 | WebElement Source = driver.findElement(By.id("customer.firstName")); 59 | Thread.sleep(2000); 60 | Source.sendKeys("Tohidur Rahman"); 61 | Actions action = new Actions(driver); 62 | action.keyDown(Keys.COMMAND).sendKeys("a").keyUp(Keys.COMMAND).build().perform(); 63 | action.keyDown(Keys.COMMAND).sendKeys("c").keyUp(Keys.COMMAND).build().perform(); 64 | Thread.sleep(2000); 65 | WebElement terget = driver.findElement(By.id("customer.lastName")); 66 | action.keyDown(terget,Keys.COMMAND).sendKeys("v").keyUp(Keys.COMMAND).build().perform(); 67 | 68 | Thread.sleep(2000); 69 | driver.quit(); 70 | 71 | 72 | 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/Java/ArrayConcept.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Iterator; 5 | import java.util.LinkedList; 6 | import java.util.List; 7 | 8 | public class ArrayConcept { 9 | 10 | public static void main(String[] args) { 11 | 12 | 13 | //static 14 | //2D & 3D array 15 | 16 | int a[] = new int [3]; 17 | 18 | a[0] = 1; 19 | a[1] =2; 20 | a[2]=3; 21 | 22 | 23 | for (int i =0;i<3;i++) { 24 | 25 | System.out.println(a[i]);//a[0] =1; 26 | System.out.println(a[i]);//a[1] =2; 27 | 28 | 29 | } 30 | 31 | int a1[][] = new int [2][2]; 32 | 33 | a1[0][0]= 2; 34 | a1[0][1] =3; 35 | a1[1][0]= 3; 36 | a1[1][1]=0; 37 | 38 | 39 | //Dynamic 40 | 41 | /* 42 | * its dynamic array 43 | * can contain duplicate value or elements 44 | * Synchronized /Thread safe 45 | * preserve insertion order 46 | * 47 | * 48 | * 49 | */ 50 | 51 | ArrayList al = new ArrayList(); 52 | 53 | 54 | 55 | al.add(1);//0 56 | al.add("sourovG");//1 57 | al.add(2.50);//2 58 | al.add(true);//3 59 | al.add("sourov");//4 60 | 61 | 62 | 63 | 64 | System.out.println("arry size "+al.size()); 65 | System.out.println(al.get(4)); 66 | 67 | //How to print an array 68 | 69 | // for loop 70 | 71 | 72 | for (int i =0; i al2 = new ArrayList(); 95 | ArrayList al3 = new ArrayList(); 96 | ArrayList al5 = new ArrayList(); 97 | 98 | 99 | 100 | ArrayList al4 = new ArrayList(); 101 | 102 | Student studentOne = new Student("sourov",27,"science"); 103 | Student studentTwo = new Student("Banna",47,"science"); 104 | Student studentThree = new Student("Saikat",37,"science"); 105 | Student studentFour = new Student("Huzza",57,"Art"); 106 | 107 | 108 | al4.add(studentOne); 109 | al4.add(studentTwo); 110 | al4.add(studentThree); 111 | al4.add(studentFour); 112 | 113 | //Iterator 114 | 115 | Iterator it = al4.iterator(); 116 | 117 | while (it.hasNext()) { 118 | Student st = (Student) it.next(); 119 | System.out.println( st.name); 120 | System.out.println( st.age); 121 | System.out.println( st.dept); 122 | 123 | } 124 | 125 | 126 | ArrayList as = new ArrayList ();//10 127 | 128 | System.out.println("size of as arry : ----> "+as.size());//10// 129 | 130 | as.add("java"); 131 | as.add("java"); 132 | System.out.println("size of as arry : ----> "+as.size()); 133 | 134 | 135 | ArrayList ass = new ArrayList (); 136 | 137 | LinkedList ak = new LinkedList (); 138 | //vector , stack 139 | 140 | //list 141 | 142 | 143 | 144 | 145 | } 146 | 147 | } 148 | -------------------------------------------------------------------------------- /test-output/testng-reports2.js: -------------------------------------------------------------------------------- 1 | window.onload=function (){ 2 | let cookies = document.cookie; 3 | let cookieValue=cookies.split('='); 4 | if(cookieValue[1]==='null' || localStorage.getItem('Theme')==='null'){ 5 | document.getElementById('retro').setAttribute('disabled','false'); 6 | } 7 | else if(cookieValue[1]==='Switch Ultra Theme'|| localStorage.getItem('Theme')==='Switch Ultra Theme'){ 8 | document.getElementById('button').innerText="Switch Retro Theme"; 9 | document.getElementById('retro').setAttribute('disabled','false'); 10 | 11 | } 12 | else if(cookieValue[1]==='Switch Retro Theme'|| localStorage.getItem('Theme')==='Switch Retro Theme'){ 13 | else if(cookieValue[1]==='Switch Ultra Theme'|| localStorage.getItem('Theme')==='Switch Ultra Theme'){ 14 | document.getElementById('button').innerText="Switch Retro Theme"; 15 | document.getElementById('retro').setAttribute('disabled','false'); 16 | 17 | document.getElementById('button').innerText="Switch Ultra Theme"; 18 | document.getElementById('retro').removeAttribute('disabled'); 19 | document.getElementById('ultra').setAttribute('disabled','false'); 20 | localStorage.setItem('Theme',select); 21 | 22 | } 23 | else if(select ==='Switch Ultra Theme'){ 24 | document.getElementById('button').innerText="Switch Retro Theme"; 25 | document.getElementById('ultra').removeAttribute('disabled'); 26 | document.getElementById('retro').setAttribute('disabled','false'); 27 | localStorage.setItem('Theme',select); 28 | } 29 | } 30 | else if(cookieValue[1]==='Switch Retro Theme'|| localStorage.getItem('Theme')==='Switch Retro Theme'){ 31 | document.getElementById('button').innerText="Switch Ultra Theme"; 32 | document.getElementById('ultra').setAttribute('disabled','false'); 33 | } 34 | } 35 | document.getElementById('button').onclick= function(){ 36 | let select = document.getElementById('button').innerText; 37 | if(select === 'Switch Retro Theme'){ 38 | let d = new Date(); 39 | days = 365; 40 | d.setTime(+ d + (days * 86400000)); //24 * 60 * 60 * 1000 41 | document.cookie="Theme ="+select+ "; expires=" + d.toGMTString() + ";"; 42 | document.getElementById('button').innerText="Switch Ultra Theme"; 43 | document.getElementById('retro').removeAttribute('disabled'); 44 | document.getElementById('ultra').setAttribute('disabled','false'); 45 | localStorage.setItem('Theme',select); 46 | 47 | } 48 | else if(select ==='Switch Ultra Theme'){ 49 | let d = new Date(); 50 | days = 365; 51 | d.setTime(+ d + (days * 86400000)); //24 * 60 * 60 * 1000 52 | document.cookie="Theme ="+select+ "; expires=" + d.toGMTString() + ";"; 53 | document.getElementById('button').innerText="Switch Retro Theme"; 54 | document.getElementById('ultra').removeAttribute('disabled'); 55 | document.getElementById('retro').setAttribute('disabled','false'); 56 | localStorage.setItem('Theme',select); 57 | } 58 | } 59 | //Function to mouse hovering affect. 60 | document.getElementById('button').onmouseover = function(){ 61 | document.getElementById('button').style.borderRadius="25px"; 62 | document.getElementById('button').style.width="180px"; 63 | document.getElementById('button').style.height="45px"; 64 | document.getElementById('button').style.marginTop="1px"; 65 | 66 | } 67 | //Function to mouse out affect 68 | document.getElementById('button').onmouseout = function(){ 69 | document.getElementById('button').style.borderRadius="25px"; 70 | document.getElementById('button').style.width="150px"; 71 | document.getElementById('button').style.height="30px"; 72 | document.getElementById('button').style.marginTop="8px"; 73 | 74 | } 75 | 76 | //This is the file where we handle the switching of the Themes. 77 | /*Author:- Akhil Gullapalli*/ 78 | -------------------------------------------------------------------------------- /src/main/java/Java/StringConcept.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | public class StringConcept { 4 | 5 | public static void main(String[] args) { 6 | 7 | /* 8 | * 9 | * Two ways to create string String literal etc : String s = 10 | * "i like automating software"; by using new memory operator. etc : String st = 11 | * new String("like automating software"); Using String buffer and String 12 | * builder 13 | * 14 | */ 15 | 16 | // please do your own 17 | // do one step at a time . 18 | 19 | String str = "We are learning java"; 20 | System.out.println("Total length of \"We are learning java\" " + str.length()); 21 | System.out.println(str.charAt(2)); 22 | System.out.println("i am first occarance " + str.indexOf("a"));// First occurance. 23 | System.out.println("i am second occarance " + str.indexOf("a", str.indexOf("a") + 1)); 24 | System.out.println("i am 3rd occarance " + str.indexOf("a", str.indexOf("a", str.indexOf("a") + 1))); 25 | System.out.println("i am last occarance " + str.lastIndexOf("a")); 26 | 27 | // String concatination 28 | 29 | String s = "tohidur"; 30 | String r = "rahman"; 31 | 32 | s.concat(r);// it will add tohidur + rahman 33 | System.out.println(s.concat(r)); 34 | 35 | // Substring //"We are learning java";//+111-0000-34567 36 | str.substring(0, 5); 37 | s.length();// 38 | System.out.println("########" + s.length()); 39 | System.out.println(s.substring(1, s.length() - 1)); 40 | System.out.println(str.substring(4, 14)); // i will cut from 4th index to before 14th index on that given 41 | // string. 42 | 43 | // String comparison 44 | String s1 = "sourov."; 45 | String s2 = "rahman"; 46 | 47 | s1.equals(s2);// == 48 | 49 | System.out.println("#########################"); 50 | String xx = "java"; 51 | String yy = "java"; 52 | System.out.println("using equals method @@@@: " + xx.equals(yy));// value 53 | System.out.println("using equal to : @@@@@@###" + xx == yy);// ref variable 54 | 55 | System.out.println("#########################"); 56 | 57 | System.out.println("using equals method : " + s1.equals(s2));// t/f/f 58 | System.out.println("using equal to sign : " + s1 == s2);// t/f/f 59 | System.out.println(s1.equalsIgnoreCase(s2));// t/t/f 60 | 61 | String pp = "Java"; 62 | String qq = "Selenium"; 63 | String yyy = "learning"; 64 | pp.concat(qq); 65 | pp.concat(yyy); 66 | System.out.println("@@@@@@@@@@@@@@@@@??" + pp.concat(qq)); 67 | System.out.println("@@@@@@@@@@@@@@@@@" + pp.concat(yyy)); 68 | // trim 69 | String p = " i am on train "; 70 | System.out.println("before trim :" + p); 71 | String p1 = p.trim();// i am on train 72 | System.out.println("after trim :" + p1); 73 | // Split 74 | // javalearning//ava,earning 75 | /* 76 | * Split method will return an arry of String. 77 | */ 78 | String x = "java learning class"; 79 | String sarry[] = x.split(" ");// "java" , "learning" , "class" 80 | for (int i = 0; i < sarry.length; i++) { 81 | System.out.println("inside loop and printin an array :---> " + sarry[i]); 82 | } 83 | // task 84 | 85 | String w = "java "; 86 | String y = "learning"; 87 | int a = 2; 88 | int b = 3; 89 | 90 | System.out.println(w + y);// java learning 91 | 92 | System.out.println(a + b);// 5 93 | System.out.println(w + y + a + b); // java learning23 94 | System.out.println(a + b + w + y);// 5java learning//23// 95 | System.out.println(w + y + (a + b)); // 96 | 97 | // Prove given number is a positive number. 98 | int bc = 10;// -10 99 | 100 | if (bc >= 0) { 101 | System.out.println("yes it is positive number " + bc);// 5 102 | } else { 103 | System.out.println("yes it is negative number " + bc);// 5 104 | } 105 | 106 | // String Buffer @ String builder 107 | 108 | StringBuffer sb = new StringBuffer("Java learning "); 109 | 110 | System.out.println(sb); 111 | 112 | for (int i = sb.length() - 1; i >= 0; i--) { 113 | 114 | System.out.print(sb.charAt(i)); 115 | } 116 | 117 | // 1kg -$4.00 118 | // 1kg -$4.00 119 | // 1kg -$4.00 120 | 121 | } 122 | 123 | } 124 | -------------------------------------------------------------------------------- /src/main/java/Java/Date.java: -------------------------------------------------------------------------------- 1 | package Java; 2 | 3 | import java.time.Instant; 4 | import java.time.LocalDate; 5 | import java.time.LocalDateTime; 6 | import java.time.Period; 7 | import java.time.format.DateTimeFormatter; 8 | import java.time.format.DateTimeFormatterBuilder; 9 | import java.time.format.DateTimeParseException; 10 | import java.util.Locale; 11 | 12 | public class Date { 13 | 14 | public static void main(String[] args) { 15 | 16 | 17 | // LocalDateTime localDateTime = LocalDateTime.parse("2/11/2022"); 18 | // 19 | // localDateTime = localDateTime.minusDays(5); 20 | // System.out.println(localDateTime); 21 | 22 | 23 | // DateTimeFormatterBuilder provides custom way to create a 24 | // formatter 25 | // It is Case Insensitive, Nov , nov and NOV will be treated same 26 | DateTimeFormatter f = new DateTimeFormatterBuilder().parseCaseInsensitive() 27 | .append(DateTimeFormatter.ofPattern("yyyy-MMM-dd")).toFormatter(); 28 | try { 29 | LocalDate datetime = LocalDate.parse("2019-DeC-22", f); 30 | System.out.println(datetime); // 2019-12-22 31 | } catch (DateTimeParseException e) { 32 | // Exception handling message/mechanism/logging as per company standard 33 | } 34 | 35 | // DateTimeFormatter df = new DateTimeFormatterBuilder() 36 | // // case insensitive to parse JAN and FEB 37 | // .parseCaseInsensitive() 38 | // // add pattern 39 | // .appendPattern("dd.MM.yyyy") 40 | // // create formatter (use English Locale to parse month names) 41 | // .toFormatter(Locale.ENGLISH); 42 | // 43 | // LocalDateTime localDateTime = LocalDateTime.parse("2.11.2022",df); 44 | // 45 | // localDateTime = localDateTime.minusDays(5); 46 | // System.out.println(localDateTime); 47 | 48 | System.out.println("@@@@@@@@@@@@@@@@@@@@@@@@"); 49 | 50 | String str = "07.11.2022"; 51 | String newSt = str.replace(".", "-"); 52 | System.out.println("Date after replace all "+newSt); 53 | 54 | // LocalDateTime dateTime = LocalDateTime.parse(str, DateTimeFormatter.ofPattern("dd-MM-yyyy")); 55 | // dateTime.plusMonths(3); // => output: 13/02/2021 56 | // System.out.println(dateTime); 57 | 58 | LocalDate date = LocalDate.parse(newSt, DateTimeFormatter.ofPattern("dd-MM-uuuu")); 59 | //date = date.plusMonths(3); 60 | //date = date.plusMonths(3); 61 | date = date.minusDays(1); 62 | 63 | 64 | System.out.println("Given date is : --> "+newSt); 65 | System.out.println("Date after minus : --> "+ date); 66 | 67 | 68 | System.out.println("<---- Solution is : --> "); 69 | System.out.println(); 70 | 71 | String std = "07.11.2020";//before date 0 is must 72 | System.out.println("Given date is : --> "+std); 73 | // String std = str2.replace(".", "-"); 74 | //System.out.println("Date after replace all --> "+std); 75 | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd.MM.uuuu"); 76 | LocalDate dateTime = LocalDate.parse(std, dateTimeFormatter); 77 | LocalDate newDateTime = dateTime.minusDays(1); // => output: 13/02/2021 78 | System.out.println("New Date after changes --> "+newDateTime.format(dateTimeFormatter)); 79 | System.out.println("fdgansgsdt "+getDate("08.09.2019",2)); 80 | } 81 | 82 | public static String getDate(String std,int x) { 83 | 84 | // String std = "07.11.2020";//before date 0 is must 85 | // System.out.println("Given date is : --> "+std); 86 | // String std = str2.replace(".", "-"); 87 | //System.out.println("Date after replace all --> "+std); 88 | DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("dd.MM.uuuu"); 89 | LocalDate dateTime = LocalDate.parse(std, dateTimeFormatter); 90 | LocalDate newDateTime = dateTime.minusDays(x); // => output: 13/02/2021 91 | //newDateTime.format(dateTimeFormatter); 92 | return newDateTime.format(dateTimeFormatter); 93 | //return newDateTime; 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /test-output/testng-reports.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('a.navigator-link').on("click", function() { 3 | // Extract the panel for this link 4 | var panel = getPanelName($(this)); 5 | 6 | // Mark this link as currently selected 7 | $('.navigator-link').parent().removeClass('navigator-selected'); 8 | $(this).parent().addClass('navigator-selected'); 9 | 10 | showPanel(panel); 11 | }); 12 | 13 | installMethodHandlers('failed'); 14 | installMethodHandlers('skipped'); 15 | installMethodHandlers('passed', true); // hide passed methods by default 16 | 17 | $('a.method').on("click", function() { 18 | showMethod($(this)); 19 | return false; 20 | }); 21 | 22 | // Hide all the panels and display the first one (do this last 23 | // to make sure the click() will invoke the listeners) 24 | $('.panel').hide(); 25 | $('.navigator-link').first().trigger("click"); 26 | 27 | // Collapse/expand the suites 28 | $('a.collapse-all-link').on("click", function() { 29 | var contents = $('.navigator-suite-content'); 30 | if (contents.css('display') == 'none') { 31 | contents.show(); 32 | } else { 33 | contents.hide(); 34 | } 35 | }); 36 | }); 37 | 38 | // The handlers that take care of showing/hiding the methods 39 | function installMethodHandlers(name, hide) { 40 | function getContent(t) { 41 | return $('.method-list-content.' + name + "." + t.attr('panel-name')); 42 | } 43 | 44 | function getHideLink(t, name) { 45 | var s = 'a.hide-methods.' + name + "." + t.attr('panel-name'); 46 | return $(s); 47 | } 48 | 49 | function getShowLink(t, name) { 50 | return $('a.show-methods.' + name + "." + t.attr('panel-name')); 51 | } 52 | 53 | function getMethodPanelClassSel(element, name) { 54 | var panelName = getPanelName(element); 55 | var sel = '.' + panelName + "-class-" + name; 56 | return $(sel); 57 | } 58 | 59 | $('a.hide-methods.' + name).on("click", function() { 60 | var w = getContent($(this)); 61 | w.hide(); 62 | getHideLink($(this), name).hide(); 63 | getShowLink($(this), name).show(); 64 | getMethodPanelClassSel($(this), name).hide(); 65 | }); 66 | 67 | $('a.show-methods.' + name).on("click", function() { 68 | var w = getContent($(this)); 69 | w.show(); 70 | getHideLink($(this), name).show(); 71 | getShowLink($(this), name).hide(); 72 | showPanel(getPanelName($(this))); 73 | getMethodPanelClassSel($(this), name).show(); 74 | }); 75 | 76 | if (hide) { 77 | $('a.hide-methods.' + name).trigger("click"); 78 | } else { 79 | $('a.show-methods.' + name).trigger("click"); 80 | } 81 | } 82 | 83 | function getHashForMethod(element) { 84 | return element.attr('hash-for-method'); 85 | } 86 | 87 | function getPanelName(element) { 88 | return element.attr('panel-name'); 89 | } 90 | 91 | function showPanel(panelName) { 92 | $('.panel').hide(); 93 | var panel = $('.panel[panel-name="' + panelName + '"]'); 94 | panel.show(); 95 | } 96 | 97 | function showMethod(element) { 98 | var hashTag = getHashForMethod(element); 99 | var panelName = getPanelName(element); 100 | showPanel(panelName); 101 | var current = document.location.href; 102 | var base = current.substring(0, current.indexOf('#')) 103 | document.location.href = base + '#' + hashTag; 104 | var newPosition = $(document).scrollTop() - 65; 105 | $(document).scrollTop(newPosition); 106 | } 107 | 108 | function drawTable() { 109 | for (var i = 0; i < suiteTableInitFunctions.length; i++) { 110 | window[suiteTableInitFunctions[i]](); 111 | } 112 | 113 | for (var k in window.suiteTableData) { 114 | var v = window.suiteTableData[k]; 115 | var div = v.tableDiv; 116 | var data = v.tableData 117 | var table = new google.visualization.Table(document.getElementById(div)); 118 | table.draw(data, { 119 | showRowNumber : false 120 | }); 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /src/main/java/HomeWork/Task.java: -------------------------------------------------------------------------------- 1 | package HomeWork; 2 | 3 | public class Task { 4 | 5 | // After completing below task it will gives you enough confidence when you 6 | // build your own logic. 7 | 8 | /* 9 | * 01.Create a method with no arguments; 02.Create a method which return void; 10 | * 03.Create a method which return a boolean value; 04.Create a method with one 11 | * parameter Data type is integer; 05.Create a method with Two parameter Data 12 | * type is String; 06.Create a method with Two parameter Data type is integer 13 | * and String; 07.Create a method with Three parameter Data type is integer, 14 | * String , boolean; 08.Create a method which accept two integer arguments and 15 | * return sum of those two integer; 09.Create a method which accept two string 16 | * arguments and return boolean value; 10.Print 1 to 10 using while loop; 17 | */ 18 | 19 | // All of you have to finish below task before next 20 | // class.(08/08/2022-12.08.2022) 21 | /* 22 | * Problem:- 11. Given a string and a non-negative int n, return a larger string 23 | * that is n copies of the original string. Example below : stringTimes("Hi", 2) 24 | * → "HiHi" stringTimes("Hi", 3) → "HiHiHi" stringTimes("Hi", 1) → "Hi" 25 | */ 26 | public static String problem_11(String s, int a) { 27 | 28 | String newOne = ""; 29 | for (int i = 0; i < a; i++) { 30 | newOne = newOne + s; 31 | } 32 | return newOne; 33 | } 34 | 35 | /* 36 | * Problem:-12 Given a string, we'll say that the front is the first 3 chars of 37 | * the string, If the string length is less than 3, the front is whatever is 38 | * there, Return a new string which is 3 copies of the front. Example below : 39 | * front3("Java") → "JavJavJav" front3("Chocolate") → "ChoChoCho" front3("abc") 40 | * → "abcabcabc" 41 | */ 42 | public static String problem_Twelve(String str) { 43 | 44 | String front; 45 | if (str.length() <= 0) { 46 | front = str.substring(0, 3); 47 | } else { 48 | front = str; 49 | } 50 | return front + front + front; 51 | } 52 | 53 | /* 54 | * Problem:-13 Given a string, take the last char and return a new string with 55 | * the last char added at the front and back, so "cat" yields "tcatt". The 56 | * original string will be length 1 or more. backAround("cat") → "tcatt" 57 | * backAround("Hello") → "oHelloo" backAround("a") → "aaa 58 | */ 59 | public static String problem_thirteen(String str) { 60 | String last = str.substring(str.length() - 1); 61 | String front = last + str + last; 62 | return front; 63 | } 64 | 65 | /* 66 | * Problem-14 Return true if the given non-negative number is a multiple of 3 or 67 | * a multiple of 5. Use the % "mod" operator or35(3) → true or35(10) → true 68 | * or35(8) → false 69 | */ 70 | public static boolean problem_Fourteen(int x) { 71 | if (x % 3 == 0 || x % 5 == 0) { 72 | return true; 73 | } else 74 | return false; 75 | } 76 | 77 | /* 78 | * Problem :-15 Given a string, take the first 2 chars and return the string 79 | * with the 2 chars added at both the front and back, so "kitten" 80 | * yields"kikittenki". If the string length is less than 2, use whatever chars 81 | * are there. front22("kitten") → "kikittenki" front22("Ha") → "HaHaHa" 82 | * front22("abc") → "ababcab" 83 | */ 84 | public static String problem_Fifteen(String str) { 85 | 86 | String newStr; 87 | if (str.length() <= 2) { 88 | newStr = str + str + str; 89 | } else { 90 | String s = str.substring(0, 2); 91 | newStr = s + str + s; 92 | } 93 | return newStr; 94 | } 95 | /*Problem :-16 96 | * Given a string, if the string "del" appears starting at index 1, 97 | * return a string where that "del" has been deleted. Otherwise, return the string unchanged. 98 | delDel("adelbc") → "abc" 99 | delDel("adelHello") → "aHello" 100 | delDel("adedbc") → "adedbc" 101 | */ 102 | public static String problem_Sixteen(String str) { 103 | if (str.length()>=4 && str.substring(1,4).equals("del")) { 104 | return str.substring(0, 1) + str.substring(4); 105 | }else 106 | return str; 107 | } 108 | 109 | public static void main(String[] args) { 110 | 111 | // The method will return a new string which i am printing using 112 | System.out.println("inside problem 11 : --> "+problem_11("hello", 3)); 113 | System.out.println("inside problem 12 : --> "+problem_Twelve("ja")); 114 | System.out.println("inside problem 13 : --> "+problem_thirteen("J")); 115 | System.out.println("inside problem 14 : --> "+problem_Fourteen(2)); 116 | System.out.println("inside problem 15 : --> "+problem_Fifteen("hello")); 117 | System.out.println("inside problem 16 : --> "+problem_Sixteen("hello")); 118 | 119 | } 120 | 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/Selenium/ClassOne.java: -------------------------------------------------------------------------------- 1 | package Selenium; 2 | 3 | import java.io.File; 4 | import java.io.IOException; 5 | import java.util.Iterator; 6 | import java.util.Set; 7 | import java.util.concurrent.TimeUnit; 8 | 9 | import org.apache.commons.io.FileUtils; 10 | import org.openqa.selenium.By; 11 | import org.openqa.selenium.JavascriptExecutor; 12 | import org.openqa.selenium.OutputType; 13 | import org.openqa.selenium.TakesScreenshot; 14 | import org.openqa.selenium.WebDriver; 15 | import org.openqa.selenium.WebElement; 16 | import org.openqa.selenium.chrome.ChromeDriver; 17 | import org.openqa.selenium.edge.EdgeDriver; 18 | import org.openqa.selenium.firefox.FirefoxDriver; 19 | import org.openqa.selenium.interactions.Actions; 20 | import org.openqa.selenium.support.ui.Select; 21 | import org.testng.Assert; 22 | 23 | import io.github.bonigarcia.wdm.WebDriverManager; 24 | 25 | public class ClassOne { 26 | 27 | public static void main(String[] args) throws InterruptedException, IOException { 28 | 29 | WebDriverManager.chromedriver().setup(); 30 | WebDriver driver = new ChromeDriver(); 31 | // WebDriverManager.firefoxdriver().setup(); 32 | // WebDriver driver = new FirefoxDriver(); 33 | // WebDriverManager.edgedriver().setup(); 34 | // WebDriver driver = new EdgeDriver(); 35 | driver.manage().window().maximize(); 36 | driver.manage().deleteAllCookies(); 37 | driver.manage().timeouts().pageLoadTimeout(6, TimeUnit.SECONDS); 38 | driver.get("https://rahulshettyacademy.com/AutomationPractice/"); 39 | driver.manage().timeouts().implicitlyWait(6, TimeUnit.SECONDS); 40 | // Page title test 41 | String actual = driver.getTitle();// Practice Page 42 | String expected = "Practice Page"; 43 | Assert.assertEquals(actual, expected); 44 | // 45 | // Selecting radio button 46 | driver.findElement(By.cssSelector("input[value='radio3']")).click(); 47 | boolean nes = driver.findElement(By.cssSelector("input[value='radio3']")).isSelected(); 48 | Assert.assertTrue(nes); 49 | /// 50 | 51 | // capture screenshot and store the image 52 | File s = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); 53 | FileUtils.copyFile(s, new File("practice.png")); 54 | // 55 | // // Giving Sendkeys to text field 56 | // driver.findElement(By.id("autocomplete")).clear(); 57 | // driver.findElement(By.id("autocomplete")).sendKeys("hello"); 58 | // Thread.sleep(2000); 59 | // driver.findElement(By.id("autocomplete")).clear(); 60 | // 61 | // // select DropDown 62 | // Select select = new Select(driver.findElement(By.cssSelector("#dropdown-class-example"))); 63 | // 64 | // // select.selectByIndex(1); 65 | // select.selectByVisibleText("Option3"); 66 | // // select.selectByValue("option2"); 67 | // 68 | // // CheckBox 69 | // System.out.println("before checked : " + driver.findElement(By.id("checkBoxOption2")).isSelected()); 70 | // driver.findElement(By.id("checkBoxOption2")).click(); 71 | // System.out.println("after checked " + driver.findElement(By.id("checkBoxOption2")).isSelected()); 72 | // boolean b = driver.findElement(By.id("checkBoxOption2")).isSelected(); 73 | // 74 | // Assert.assertTrue(b); 75 | // 76 | // // Alert 77 | // driver.findElement(By.xpath("//*[@value='Alert']")).click(); 78 | // Thread.sleep(3000); 79 | // 80 | // String text = driver.switchTo().alert().getText(); 81 | // // driver.switchTo().alert().accept(); 82 | // 83 | // if (text.equalsIgnoreCase("Hello , share this practice page and share your knowledge")) { 84 | // driver.switchTo().alert().accept(); 85 | // } else { 86 | // System.out.println("Thats no a currect alert"); 87 | // } 88 | // 89 | // // scrolling in Selenium using javaScript Executor. 90 | // WebElement sd = driver.findElement(By.xpath("//*[text()='Mouse Hover']")); 91 | JavascriptExecutor js = (JavascriptExecutor) driver; 92 | // js.executeScript("arguments[0].scrollIntoView();", sd); 93 | // 94 | // // Mouser hover in Selenium using actions class 95 | // Actions action = new Actions(driver); 96 | // action.moveToElement(sd).perform(); 97 | // WebElement sdd = driver.findElement(By.xpath("//*[contains(text(),'Top')]")); 98 | // action.moveToElement(sdd).click().perform(); 99 | // Thread.sleep(2000); 100 | //window switch 101 | driver.findElement(By.xpath("//*[text()='Open Window']")).click(); 102 | Set window = driver.getWindowHandles(); 103 | Iterator it = window.iterator(); 104 | //2nd Way of dealing 105 | // while(it.hasNext()) 106 | // { 107 | // String windowID = it.next(); 108 | // driver.switchTo().window(windowID); 109 | // if (!windowID.equals(driver.getWindowHandle())) 110 | // { 111 | // driver.close(); 112 | // } 113 | // } 114 | String parent = it.next(); 115 | String child = it.next(); 116 | driver.switchTo().window(child); 117 | String childTitle = driver.getTitle();//QA Click Academy 118 | Thread.sleep(5000); 119 | 120 | System.out.println("child page title :---> "+childTitle); 121 | Assert.assertEquals(childTitle, "QA Click Academy | Selenium,Jmeter,SoapUI,Appium,Database testing,QA Training Academy"); 122 | driver.close();//will close the current window [ where Selenium is working] 123 | Thread.sleep(5000); 124 | driver.switchTo().window(parent); 125 | String parentTitle = driver.getTitle();//Practice Page 126 | Assert.assertEquals(parentTitle,"Practice Page"); 127 | System.out.println("parent page title :---> "+parentTitle); 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | driver.quit();//Close all browser windows opened by Selenium and ends the WebDriver session. 146 | 147 | } 148 | 149 | 150 | } 151 | -------------------------------------------------------------------------------- /test-output/testng-reports.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0 0 5px 5px; 3 | } 4 | 5 | ul { 6 | margin: 0; 7 | } 8 | 9 | li { 10 | list-style-type: none; 11 | } 12 | 13 | a { 14 | text-decoration: none; 15 | } 16 | 17 | a:hover { 18 | text-decoration: underline; 19 | } 20 | 21 | .navigator-selected { 22 | background: #ffa500; 23 | } 24 | 25 | .wrapper { 26 | position: absolute; 27 | top: 60px; 28 | bottom: 0; 29 | left: 400px; 30 | right: 0; 31 | overflow: auto; 32 | } 33 | 34 | .navigator-root { 35 | position: absolute; 36 | top: 60px; 37 | bottom: 0; 38 | left: 0; 39 | width: 400px; 40 | overflow-y: auto; 41 | } 42 | 43 | .suite { 44 | margin: 0 10px 10px 0; 45 | background-color: #fff8dc; 46 | } 47 | 48 | .suite-name { 49 | padding-left: 10px; 50 | font-size: 25px; 51 | font-family: Times, sans-serif; 52 | } 53 | 54 | .main-panel-header { 55 | padding: 5px; 56 | background-color: #9FB4D9; /*afeeee*/; 57 | font-family: monospace; 58 | font-size: 18px; 59 | } 60 | 61 | .main-panel-content { 62 | padding: 5px; 63 | margin-bottom: 10px; 64 | background-color: #DEE8FC; /*d0ffff*/; 65 | } 66 | 67 | .rounded-window { 68 | border-radius: 10px; 69 | border-style: solid; 70 | border-width: 1px; 71 | } 72 | 73 | .rounded-window-top { 74 | border-top-right-radius: 10px 10px; 75 | border-top-left-radius: 10px 10px; 76 | border-style: solid; 77 | border-width: 1px; 78 | overflow: auto; 79 | } 80 | 81 | .light-rounded-window-top { 82 | border-top-right-radius: 10px 10px; 83 | border-top-left-radius: 10px 10px; 84 | } 85 | 86 | .rounded-window-bottom { 87 | border-style: solid; 88 | border-width: 0 1px 1px 1px; 89 | border-bottom-right-radius: 10px 10px; 90 | border-bottom-left-radius: 10px 10px; 91 | overflow: auto; 92 | } 93 | 94 | .method-name { 95 | font-size: 12px; 96 | font-family: monospace; 97 | } 98 | 99 | .method-content { 100 | border-style: solid; 101 | border-width: 0 0 1px 0; 102 | margin-bottom: 10px; 103 | padding-bottom: 5px; 104 | width: 80%; 105 | } 106 | 107 | .parameters { 108 | font-size: 14px; 109 | font-family: monospace; 110 | } 111 | 112 | .stack-trace { 113 | white-space: pre; 114 | font-family: monospace; 115 | font-size: 12px; 116 | font-weight: bold; 117 | margin-top: 0; 118 | margin-left: 20px; 119 | } 120 | 121 | .testng-xml { 122 | font-family: monospace; 123 | } 124 | 125 | .method-list-content { 126 | margin-left: 10px; 127 | } 128 | 129 | .navigator-suite-content { 130 | margin-left: 10px; 131 | font: 12px 'Lucida Grande'; 132 | } 133 | 134 | .suite-section-title { 135 | margin-top: 10px; 136 | width: 80%; 137 | border-style: solid; 138 | border-width: 1px 0 0 0; 139 | font-family: Times, sans-serif; 140 | font-size: 18px; 141 | font-weight: bold; 142 | } 143 | 144 | .suite-section-content { 145 | list-style-image: url(bullet_point.png); 146 | } 147 | 148 | .top-banner-root { 149 | position: absolute; 150 | top: 0; 151 | height: 45px; 152 | left: 0; 153 | right: 0; 154 | padding: 5px; 155 | margin: 0 0 5px 0; 156 | background-color: #0066ff; 157 | font-family: Times, sans-serif; 158 | color: #fff; 159 | text-align: center; 160 | } 161 | .button{ 162 | position: absolute; 163 | margin-left:500px; 164 | margin-top:8px; 165 | background-color: white; 166 | color:#0066ff; 167 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 168 | font-weight:bold; 169 | border-color:#0066ff ; 170 | border-radius:25px; 171 | cursor: pointer; 172 | height:30px; 173 | width:150px; 174 | outline:none; 175 | 176 | } 177 | 178 | .top-banner-title-font { 179 | font-size: 25px; 180 | } 181 | 182 | .test-name { 183 | font-family: 'Lucida Grande', sans-serif; 184 | font-size: 16px; 185 | } 186 | 187 | .suite-icon { 188 | padding: 5px; 189 | float: right; 190 | height: 20px; 191 | } 192 | 193 | .test-group { 194 | font: 20px 'Lucida Grande'; 195 | margin: 5px 5px 10px 5px; 196 | border-width: 0 0 1px 0; 197 | border-style: solid; 198 | padding: 5px; 199 | } 200 | 201 | .test-group-name { 202 | font-weight: bold; 203 | } 204 | 205 | .method-in-group { 206 | font-size: 16px; 207 | margin-left: 80px; 208 | } 209 | 210 | table.google-visualization-table-table { 211 | width: 100%; 212 | } 213 | 214 | .reporter-method-name { 215 | font-size: 14px; 216 | font-family: monospace; 217 | } 218 | 219 | .reporter-method-output-div { 220 | padding: 5px; 221 | margin: 0 0 5px 20px; 222 | font-size: 12px; 223 | font-family: monospace; 224 | border-width: 0 0 0 1px; 225 | border-style: solid; 226 | } 227 | 228 | .ignored-class-div { 229 | font-size: 14px; 230 | font-family: monospace; 231 | } 232 | 233 | .ignored-methods-div { 234 | padding: 5px; 235 | margin: 0 0 5px 20px; 236 | font-size: 12px; 237 | font-family: monospace; 238 | border-width: 0 0 0 1px; 239 | border-style: solid; 240 | } 241 | 242 | .border-failed { 243 | border-top-left-radius: 10px 10px; 244 | border-bottom-left-radius: 10px 10px; 245 | border-style: solid; 246 | border-width: 0 0 0 10px; 247 | border-color: #f00; 248 | } 249 | 250 | .border-skipped { 251 | border-top-left-radius: 10px 10px; 252 | border-bottom-left-radius: 10px 10px; 253 | border-style: solid; 254 | border-width: 0 0 0 10px; 255 | border-color: #edc600; 256 | } 257 | 258 | .border-passed { 259 | border-top-left-radius: 10px 10px; 260 | border-bottom-left-radius: 10px 10px; 261 | border-style: solid; 262 | border-width: 0 0 0 10px; 263 | border-color: #19f52d; 264 | } 265 | 266 | .times-div { 267 | text-align: center; 268 | padding: 5px; 269 | } 270 | 271 | .suite-total-time { 272 | font: 16px 'Lucida Grande'; 273 | } 274 | 275 | .configuration-suite { 276 | margin-left: 20px; 277 | } 278 | 279 | .configuration-test { 280 | margin-left: 40px; 281 | } 282 | 283 | .configuration-class { 284 | margin-left: 60px; 285 | } 286 | 287 | .configuration-method { 288 | margin-left: 80px; 289 | } 290 | 291 | .test-method { 292 | margin-left: 100px; 293 | } 294 | 295 | .chronological-class { 296 | background-color: skyblue; 297 | border-style: solid; 298 | border-width: 0 0 1px 1px; 299 | } 300 | 301 | .method-start { 302 | float: right; 303 | } 304 | 305 | .chronological-class-name { 306 | padding: 0 0 0 5px; 307 | color: #008; 308 | } 309 | 310 | .after, .before, .test-method { 311 | font-family: monospace; 312 | font-size: 14px; 313 | } 314 | 315 | .navigator-suite-header { 316 | font-size: 22px; 317 | margin: 0 10px 5px 0; 318 | background-color: #deb887; 319 | text-align: center; 320 | } 321 | 322 | .collapse-all-icon { 323 | padding: 5px; 324 | float: right; 325 | } 326 | /*retro Theme*/ 327 | -------------------------------------------------------------------------------- /test-output/testng-reports1.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: whitesmoke; 3 | margin: 0 0 5px 5px; 4 | } 5 | ul { 6 | margin-top: 10px; 7 | margin-left:-10px; 8 | } 9 | li { 10 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 11 | padding:5px 5px; 12 | } 13 | a { 14 | text-decoration: none; 15 | color: black; 16 | font-size: 14px; 17 | } 18 | 19 | a:hover { 20 | color:black ; 21 | text-decoration: underline; 22 | } 23 | 24 | .navigator-selected { 25 | /* #ffa500; Mouse hover color after click Orange.*/ 26 | background:#027368 27 | } 28 | 29 | .wrapper { 30 | position: absolute; 31 | top: 60px; 32 | bottom: 0; 33 | left: 400px; 34 | right: 0; 35 | margin-right:9px; 36 | overflow: auto;/*imortant*/ 37 | } 38 | 39 | .navigator-root { 40 | position: absolute; 41 | top: 60px; 42 | bottom: 0; 43 | left: 0; 44 | width: 400px; 45 | overflow-y: auto;/*important*/ 46 | } 47 | 48 | .suite { 49 | margin: -5px 10px 10px 5px; 50 | background-color: whitesmoke ;/*Colour of the left bside box*/ 51 | } 52 | 53 | .suite-name { 54 | font-size: 24px; 55 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;/*All TEST SUITE*/ 56 | color: white; 57 | } 58 | 59 | .main-panel-header { 60 | padding: 5px; 61 | background-color: #027368; /*afeeee*/; 62 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 63 | color:white; 64 | font-size: 18px; 65 | } 66 | 67 | .main-panel-content { 68 | padding: 5px; 69 | margin-bottom: 10px; 70 | background-color: #CCD0D1; /*d0ffff*/; /*Belongs to backGround of rightSide boxes*/ 71 | } 72 | 73 | .rounded-window { 74 | border-style: dotted; 75 | border-width: 1px;/*Border of left Side box*/ 76 | background-color: whitesmoke; 77 | border-radius: 10px; 78 | } 79 | 80 | .rounded-window-top { 81 | border-top-right-radius: 10px 10px; 82 | border-top-left-radius: 10px 10px; 83 | border-style: solid; 84 | border-width: 1px; 85 | overflow: auto;/*Top of RightSide box*/ 86 | } 87 | 88 | .light-rounded-window-top { 89 | background-color: #027368; 90 | padding-left:120px; 91 | border-radius: 10px; 92 | 93 | } 94 | 95 | .rounded-window-bottom { 96 | border-bottom-right-radius: 10px 10px; 97 | border-bottom-left-radius: 10px 10px; 98 | overflow: auto;/*Bottom of rightSide box*/ 99 | } 100 | 101 | .method-name { 102 | font-size: 14px; 103 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 104 | font-weight: bold; 105 | } 106 | 107 | .method-content { 108 | border-style: solid; 109 | border-width: 0 0 1px 0; 110 | margin-bottom: 10px; 111 | padding-bottom: 5px; 112 | width: 100%; 113 | } 114 | 115 | .parameters { 116 | font-size: 14px; 117 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 118 | } 119 | 120 | .stack-trace { 121 | white-space: pre; 122 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 123 | font-size: 12px; 124 | font-weight: bold; 125 | margin-top: 0; 126 | margin-left: 20px; /*Error Stack Trace Message*/ 127 | } 128 | 129 | .testng-xml { 130 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 131 | } 132 | 133 | .method-list-content { 134 | margin-left: 10px; 135 | } 136 | 137 | .navigator-suite-content { 138 | margin-left: 10px; 139 | font: 12px 'Lucida Grande'; 140 | } 141 | 142 | .suite-section-title { 143 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 144 | font-size: 14px; 145 | font-weight:bold; 146 | background-color: #8C8887; 147 | margin-left: -10px; 148 | margin-top:10px; 149 | padding:6px; 150 | } 151 | 152 | .suite-section-content { 153 | list-style-image: url(bullet_point.png); 154 | background-color: whitesmoke; 155 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 156 | overflow: hidden; 157 | } 158 | 159 | .top-banner-root { 160 | position: absolute; 161 | top: 0; 162 | height: 45px; 163 | left: 0; 164 | right: 0; 165 | padding: 5px; 166 | margin: 0 0 5px 0; 167 | background-color: #027368; 168 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 169 | font-size: 18px; 170 | color: #fff; 171 | text-align: center;/*Belongs to the Top of Report*//*Status: - Completed*/ 172 | } 173 | 174 | .top-banner-title-font { 175 | font-size: 25px; 176 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 177 | padding: 3px; 178 | float: right; 179 | } 180 | 181 | .test-name { 182 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 183 | font-size: 16px; 184 | } 185 | 186 | .suite-icon { 187 | padding: 5px; 188 | float: right; 189 | height: 20px; 190 | } 191 | 192 | .test-group { 193 | font: 20px 'Lucida Grande'; 194 | margin: 5px 5px 10px 5px; 195 | border-width: 0 0 1px 0; 196 | border-style: solid; 197 | padding: 5px; 198 | } 199 | 200 | .test-group-name { 201 | font-weight: bold; 202 | } 203 | 204 | .method-in-group { 205 | font-size: 16px; 206 | margin-left: 80px; 207 | } 208 | 209 | table.google-visualization-table-table { 210 | width: 100%; 211 | } 212 | 213 | .reporter-method-name { 214 | font-size: 14px; 215 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 216 | } 217 | 218 | .reporter-method-output-div { 219 | padding: 5px; 220 | margin: 0 0 5px 20px; 221 | font-size: 12px; 222 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 223 | border-width: 0 0 0 1px; 224 | border-style: solid; 225 | } 226 | 227 | .ignored-class-div { 228 | font-size: 14px; 229 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 230 | } 231 | 232 | .ignored-methods-div { 233 | padding: 5px; 234 | margin: 0 0 5px 20px; 235 | font-size: 12px; 236 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 237 | border-width: 0 0 0 1px; 238 | border-style: solid; 239 | } 240 | 241 | .border-failed { 242 | border-radius:2px; 243 | border-style: solid; 244 | border-width: 0 0 0 10px; 245 | border-color: #F20505; 246 | } 247 | 248 | .border-skipped { 249 | border-radius:2px; 250 | border-style: solid; 251 | border-width: 0 0 0 10px; 252 | border-color: #F2BE22; 253 | } 254 | 255 | .border-passed { 256 | border-radius:2px; 257 | border-style: solid; 258 | border-width: 0 0 0 10px; 259 | border-color: #038C73; 260 | } 261 | 262 | .times-div { 263 | text-align: center; 264 | padding: 5px; 265 | } 266 | 267 | .suite-total-time { 268 | font: 16px 'Lucida Grande'; 269 | } 270 | 271 | .configuration-suite { 272 | margin-left: 20px; 273 | } 274 | 275 | .configuration-test { 276 | margin-left: 40px; 277 | } 278 | 279 | .configuration-class { 280 | margin-left: 60px; 281 | } 282 | 283 | .configuration-method { 284 | margin-left: 80px; 285 | } 286 | 287 | .test-method { 288 | margin-left: 100px; 289 | } 290 | 291 | .chronological-class { 292 | background-color: #CCD0D1; 293 | border-width: 0 0 1px 1px;/*Chronological*/ 294 | } 295 | 296 | .method-start { 297 | float: right; 298 | } 299 | 300 | .chronological-class-name { 301 | padding: 0 0 0 5px; 302 | margin-top:5px; 303 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 304 | color: #008; 305 | } 306 | 307 | .after, .before, .test-method { 308 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 309 | font-size: 14px; 310 | margin-top:5px; 311 | } 312 | 313 | .navigator-suite-header { 314 | font-size: 18px; 315 | margin: 0px 10px 10px 5px; 316 | padding: 5px; 317 | border-radius: 10px; 318 | background-color: #027368; 319 | color: white; 320 | font-weight:bold; 321 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 322 | text-align: center; /*All Suites on top of left box*//*Status: -Completed*/ 323 | } 324 | 325 | .collapse-all-icon { 326 | padding: 3px; 327 | float: right; 328 | } 329 | .button{ 330 | position: absolute; 331 | margin-left:500px; 332 | margin-top:8px; 333 | background-color: white; 334 | color:#027368; 335 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 336 | font-weight:bold; 337 | border-color:#027368; 338 | border-radius:25px; 339 | cursor: pointer; 340 | height:30px; 341 | width:150px; 342 | outline: none; 343 | } 344 | /*Author: - Akhil Gullapalli*/ -------------------------------------------------------------------------------- /test-output/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | TestNG reports 7 | 8 | 9 | 10 | 11 | 12 | 13 | 19 | 22 | 23 | 24 | 25 |
26 | Test results 27 | 28 |
29 | 1 suite 30 |
31 | 119 |
120 |
121 |
122 |
123 |
124 | 125 | Selenium.BasicAuth 126 |
127 |
128 |
129 |
130 | 131 | 132 | basicAuthUsingUri 133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 | /private/var/folders/hw/9qtphsf54yb8t1ghlc5cx3kr0000gn/T/testng-eclipse-2023478514/testng-customsuite.xml 141 |
142 |
143 |
144 | <?xml version="1.0" encoding="UTF-8"?>
145 | <!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
146 | <suite name="Default suite" guice-stage="DEVELOPMENT">
147 |   <test thread-count="5" name="Default test" verbose="2">
148 |     <classes>
149 |       <class name="Selenium.BasicAuth">
150 |         <methods>
151 |           <include name="basicAuthUsingUri"/>
152 |         </methods>
153 |       </class> <!-- Selenium.BasicAuth -->
154 |     </classes>
155 |   </test> <!-- Default test -->
156 | </suite> <!-- Default suite -->
157 |             
158 |
159 |
160 |
161 |
162 | Tests for Default suite 163 |
164 |
165 |
    166 |
  • 167 | Default test (1 class) 168 |
  • 169 |
170 |
171 |
172 |
173 |
174 | Groups for Default suite 175 |
176 |
177 |
178 |
179 |
180 |
181 | Times for Default suite 182 |
183 |
184 |
185 | 202 | Total running time: 6 seconds 203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 | Reporter output for Default suite 211 |
212 |
213 |
214 |
215 |
216 |
217 | 2 ignored methods 218 |
219 |
220 |
221 | Selenium.BasicAuth 222 |
223 | basicAuthNotByPass 224 |
225 | basicAuth 226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 | Methods in chronological order 234 |
235 |
236 |
237 |
Selenium.BasicAuth
238 |
239 | basicAuthUsingUri 240 | 0 ms 241 |
242 |
243 |
244 |
245 |
246 | 247 | 248 | 249 | -------------------------------------------------------------------------------- /test-output/jquery-3.4.1.min.js: -------------------------------------------------------------------------------- 1 | /*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ 2 | !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0