In My JavaCode , After clicking on Edit Description link a window get opens (i.e. Java Script Window) Images here 1st one gives anchor tag with attributes and 2nd one is opened window
Image 1::
Image 2:: Window image Along with Page Source here
What i need is A. Select the window open(java script) B. Enter the text into Text Area and click Ok.
control is waiting infinite # Select Window key word its not moving forward. I have to kill Control forcefully.
Here is the code
package Bala.AutoPratice.module1;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class WindowSwitch {
public static void main(String[] args) throws InterruptedException {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver", "D:\\bin\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
//driver.manage().window().maximize();
driver.get("http://10.1.111.165/Login.aspx");
//To check if we have landed in the correct place
driver.findElement(By.id("LoginName")).sendKeys("User1");
driver.findElement(By.id("Password")).sendKeys("User1#123");
driver.findElement(By.id("LoginBtn")).click();
driver.get("http://10.1.111.165/roles.aspx");
driver.findElement(By.xpath("//*[#id=\"NewBtn\"]/span")).click();
driver.findElement(By.xpath("//*[#id=\"aspnetForm\"]/table/tbody/tr[1]/td[2]/a")).click();
String MainWindow=driver.getWindowHandle();
Set<String> s1=driver.getWindowHandles();
Iterator<String> i1=s1.iterator();
while(i1.hasNext())
{
String ChildWindow=i1.next();
if(!MainWindow.equalsIgnoreCase(ChildWindow))
{
// Switching to Child window
driver.switchTo().window(ChildWindow); // HERE IT NEVER SELECTS
driver.findElement(By.xpath("//*[#id=\"descript\"]")).sendKeys("gadddn#gmail.com");
driver.findElement(By.xpath("//*[#id=\"myform\"]/div/input[1]")).click();
// Closing the Child Window.
driver.close();
}
}
// Switching to Parent window i.e Main Window.
driver.switchTo().window(MainWindow);
driver.quit();
}
}
If i use this
Alert myAlert = new WebDriverWait(driver, 10).until(ExpectedConditions.alertIsPresent());
myAlert.sendKeys("I_am_bbk");
myAlert.accept();
I am getting this error
INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'no such alert' (400 expected)
Exception in thread "main" org.openqa.selenium.TimeoutException: Expected condition failed: waiting for alert to be present (tried for 10 second(s) with 500 MILLISECONDS interval)
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'HIBAWL56712', ip: '10.158.126.17', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_151'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities
It is pretty clear from your snapshot that the window which gets opened is a JavaScript window i.e. an Alert. To enter some text into the Text Area and click Ok you can use the following block of code :
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.support.ui.ExpectedConditions;
//other code
Alert myAlert = new WebDriverWait(driver, 10).until(ExpectedConditions.alertIsPresent());
myAlert.sendKeys("I_am_bbk");
myAlert.accept();
driver.quit();
Related
I tried to press Ctrl+T using Selenium (Java) in the Chrome browser. There is no error in the console, but the browser does not open a new tab. I want to know why this happens. I tried to find on Stack Overflow, but I didn't find any accurate answer.
This is my code:
package automation1;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
public class Action {
public static void main(String[] args) throws InterruptedException {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\asus\\OneDrive\\Desktop\\Jar\\chromedriver_win32\\chromedriver.exe");
WebDriver chromedriver = new ChromeDriver();
chromedriver.get("https://xenodochial-meninsky-118d47.netlify.app/");
chromedriver.manage().window().fullscreen();
Actions a = new Actions(chromedriver) ;
Thread.sleep(3000) ;
a.sendKeys(Keys.CONTROL +"t").build().perform() ;
}
}
Why doesn't this not open a new tab in the Chrome browser?
There is a solution without using org.openqa.selenium.interactions.Actions.
For selenium 3.141.59:
pom.xml dependency:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>
Code:
package tests;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class TejveerNaruka {
public static void main(String[] args) {
String chromedriverPath = System.getProperty("user.dir") + "\\resources\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", chromedriverPath);
ChromeOptions options = new ChromeOptions();
options.addArguments("--ignore-certificate-errors");
options.addArguments("--start-maximized");
options.addArguments("--disable-notifications");
WebDriver driver = new ChromeDriver(options);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
driver.get("https://www.stackoverflow.com");
System.out.println(driver.getTitle());
// open new tab using javascript
jsExecutor.executeScript("window.open()");
// get Window handles, identifications of all browser tabs and windows
List<String> windowHandles = new ArrayList<String> (driver.getWindowHandles());
// switch to second tab
driver.switchTo().window(windowHandles.get(1));
// prints title of the second tab (empty line)
System.out.println(driver.getTitle());
// navigate driver in the second tab
driver.get("https://www.zemancountdown.cz/");
// prints title of the second tab
System.out.println(driver.getTitle());
// close second tab
jsExecutor.executeScript("window.close()");
// switch to the first tab
driver.switchTo().window(windowHandles.get(0));
//prints title of the first tab
System.out.println(driver.getTitle());
driver.quit();
}
}
Output:
Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359#{#1016}) on port 18498
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Pro 12, 2022 12:50:43 ODP. org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Stack Overflow - Where Developers Learn, Share, & Build Careers
Miloš Zeman Countdown
Stack Overflow - Where Developers Learn, Share, & Build Careers
Another example now with selenium 4:
pom.xml dependency:
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.7.1</version>
</dependency>
Code:
package tests;
import java.time.Duration;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WindowType;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
public class TejveerNaruka {
public static void main(String[] args) {
String chromedriverPath = System.getProperty("user.dir") + "\\resources\\chromedriver.exe";
System.setProperty("webdriver.chrome.driver", chromedriverPath);
ChromeOptions options = new ChromeOptions();
options.addArguments("--ignore-certificate-errors");
options.addArguments("--start-maximized");
options.addArguments("--disable-notifications");
WebDriver driver = new ChromeDriver(options);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
// navigate driver and print title
driver.get("https://www.stackoverflow.com");
System.out.println(driver.getTitle());
// create second driver in new tab
WebDriver driver2 = driver.switchTo().newWindow(WindowType.TAB);
// prints empty line
System.out.println(driver2.getTitle());
// navigate driver2 and print title
driver2.get("https://www.zemancountdown.cz/");
System.out.println(driver2.getTitle());
driver2.quit();
driver.quit();
}
}
Output:
Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359#{#1016}) on port 24322
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Stack Overflow - Where Developers Learn, Share, & Build Careers
Miloš Zeman Countdown
On my current project we use Selenium together with Jsoup in some of our integration tests. We don't want to get the entire pageSource as this is too slow. Instead we want to select the elements we need directly. Is there a way to do this and then still return a Jsoup Element ArrayList?
public Elements getElementsByTag(final String tag) {
final Document document = Jsoup.parse(webDriver.getPageSource());
return document.getElementsByTag(tag);
}
What are you looking for is element.getAttribute("innerHTML")
Code example:
package tests;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import selenium.ChromeDriverSetup;
public class Rookie extends ChromeDriverSetup {
public static void main(String[] args) {
WebDriver driver = startChromeDriver(); // wrapped driver init
driver.get("https://stackoverflow.com");
WebElement header = driver.findElement(By.tagName("header"));
String headerSourceCode = header.getAttribute("innerHTML");
Document document = Jsoup.parse(headerSourceCode);
System.out.println("Ammount of attributes: " + document.attributesSize());
System.out.println("Ammount of childs: " + document.childrenSize());
driver.quit();
}
}
Output:
Starting ChromeDriver 103.0.5060.53 (a1711811edd74ff1cf2150f36ffa3b0dae40b17f-refs/branch-heads/5060#{#853}) on port 3173
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Čvc 13, 2022 12:44:52 ODP. org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Ammount of attributes: 1
Ammount of childs: 1
I am new to automation and trying to click on a dropdown in my application in Safari Browser but the script fails with error.
Please Help.
Error :
An unknown server-side error occurred while processing the command. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'DHRODCLPC0316', ip: '2409:4042:2098:9614:d857:22cd:8ec8:8ceb%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '13.0.2'
Driver info: org.openqa.selenium.safari.SafariDriver
Capabilities {applicationCacheEnabled: true, browserName: safari, cleanSession: true, cssSelectorsEnabled: true, databaseEnabled: true, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: false, nativeEvents: true, platform: MAC, platformName: MAC, rotatable: false, version: 13605.3.8, webStorageEnabled: true}
Session ID: C7B2C752-80D4-4453-B0C7-C35151B11F3C
Configuration :
Safari Version 13
Macbook Pro machine
Flow of Code
Open URL https://shop-lbs.mediatis.de
Login with credentials
Click on Quick order
Enter few codes to add in cart
Verify prices and checkout
Now select shipping address from dropdown
SCRIPT :
package lbs.leica;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.safari.SafariDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
public class Testcase_240_UAT_SAFARI extends ExtentReport_UAT
{
WebDriver driver;
public static String cardNumber = "4111-1111-1111-1111";
public static String Expiry = "01/29";
#BeforeTest
public void initialization()
{
test = extent.createTest("Order tests in UAT plethora of different order tests to verify tax, shipping, customer pricing, list pricing");
driver = new SafariDriver();
driver.manage().window().maximize();
driver.manage().deleteAllCookies();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(60, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.navigate().to("https://shop-lbs.mediatis.de");
System.out.println(driver.getTitle());
reportLog(driver.getTitle());
}
#Test
public void VerifyPrices() throws IOException, InterruptedException
{
driver.findElement(By.xpath("//*[#id='login-menu_login_title']")).click();
Thread.sleep(2000);
driver.findElement(By.xpath("(//*[#id='ShopLoginForm_Login'])[2]")).clear();
driver.findElement(By.xpath("(//*[#id='ShopLoginForm_Login'])[2]")).sendKeys("fjsim#buffalo.edu");
Thread.sleep(2000);
driver.findElement(By.xpath("(//*[#id='ShopLoginForm_Password'])[2]")).sendKeys("!InterShop00!");
reportLog("Entered username and password");
// Click on login in button
driver.findElement(By.xpath("(//*[#class='account-sign-in btn btn-primary'])[2]")).click();
Thread.sleep(5000);
reportLog("Clicked on Login ");
driver.findElement(By.xpath("//*[#class='view-account']")).click();
Thread.sleep(5000);
// Click on Quick Order
driver.findElement(By.xpath("//*[#class='quickorder-li hidden-xs']")).click();
Thread.sleep(5000);
reportLog("Clicked on Quick Order ");
// Click on Copy and paste
driver.findElement(By.xpath("(//*[text()='Copy and paste'])[1]")).click();
Thread.sleep(4000);
reportLog("Clicked on Copy and paste ");
//Enter Codes in text box
String[] voucherCodes = {"DS9800 1", "PA0515 2", "AR0222 3", "PA0027 4", "PA0571 5", "PA0813 6", "3801800 1", "3803650 1", "3800680 1", "3801815 1", "3800675 1", "3800080 1", "3800050CL 1", "3800161 1"};
WebElement input = driver.findElement(By.id("addToCartCopyAndPaste_textArea"));
for (String voucher : voucherCodes)
{
input.sendKeys(voucher+"\n");
}
reportLog("Entered Codes ");
//Click on Add to cart
driver.findElement(By.id("addToCartCopyAndPaste")).click();
Thread.sleep(9000);
reportLog("Clicked on Add to cart ");
//Verify and Print price
List<WebElement> VerifyPrice = driver.findElements(By.xpath("//*[#class=' col-xs-4 col-sm-offset-1 col-sm-2 list-item column-price single-price']"));
for(WebElement price:VerifyPrice)
{
System.out.println(price.getText());
reportLog(price.getText());
}
System.out.println();
//Verify and Print Product
List<WebElement> VerifyProduct = driver.findElements(By.xpath("//*[#class='product-title']"));
for(WebElement product:VerifyProduct)
{
System.out.println(product.getText());
reportLog(product.getText());
}
System.out.println();
Thread.sleep(4000);
//Click Checkout on shopping cart page
driver.findElement(By.xpath("//*[#class='btn btn-block btn-primary']")).click();
Thread.sleep(4000);
reportLog("Clicked Checkout on shopping cart page ");
//Select shipping address
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("window.scrollTo(0, 200)");
Thread.sleep(5000);
WebDriverWait wait = new WebDriverWait(driver, 60);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("(//*[#class='btn dropdown-toggle btn-default'])[2]")));
System.out.println("Address dropdown visible");
WebElement e1 = driver.findElement(By.xpath("(//*[#class='btn dropdown-toggle btn-default'])[2]"));
e1.click();
Thread.sleep(5000);
System.out.println("Address dropdown Clicked");
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("(//*[#class='dropdown-menu inner'])[2]/li[1]")));
System.out.println(" dropdown visible");
driver.findElement(By.xpath("(//*[#class='dropdown-menu inner'])[2]/li[1]")).click();
Thread.sleep(2000);
System.out.println(" dropdown clicked");
reportLog("Selected first address ");
"An unknown server-side error occurred while processing the command."
This may indicate a bug in safaridriver. To more easily see what's going on, try passing 'safari:diagnose' capability to New Session. This will cause safaridriver to log protocol traffic to ~/Library/Logs/com.apple.WebDriver//. See man safaridriver for more information about enabling diagnostics.
If the protocol trace shows a command is failing unexpectedly (eg, HTTP 500), then please file an issue at https://feedbackassistant.apple.com/ so that it may be investigated by Apple. Including a reduced, standalone test case is super helpful for fixing issues, so please do that!
Thanks!
I am trying to develop automation test on Amazon active Workspace, which uses Windows Server 2012 R2. I am doing it on local machine using localhost:8002. There is no internet access on the machine. So far I have following code:
package activeworkspaceprog;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
public class ActiveWorkspaceProg {
WebDriver driver;
JavascriptExecutor jse;
public static void main(String[] args)
{
ActiveWorkspaceProg run = new ActiveWorkspaceProg();
run.invokeBrowser();
}
public void invokeBrowser()
{
try
{
System.setProperty("webdriver.ie.driver","C:\\Users\\Administrator\\Desktop\\IEDriverServer.exe");
DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
driver = new RemoteWebDriver(
new URL("https://WIN-K0E8GV2L510:8002#hub-cloud.browserstack.com/wd/hub")
,capability);
capability.setCapability(InternetExplorerDriver.
INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
driver = new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
driver.get("http://localhost:8002/awc/");
}
catch( Exception e)
{
e.printStackTrace();
}
}
}
I am using Selenium Standalone Server-3.13.0 jar and IEDriverServer.exe (version - 3.13.0.0) as my WebDriver.
But, I am just getting the following error,and I am stuck.
Error:
org.openqa.selenium.remote.UnreachableBrowserException: Could not
start a new session. Possible causes are invalid address of the remote
server or browser start-up failure. Build info: version: '3.13.0',
revision: '2f0d292', time: '2018-06-25T15:32:19.891Z' System info:
host: 'WIN-K0E8GV2L510', ip: '10.0.1.252', os.name: 'Windows Server
2012 R2', os.arch: 'amd64', os.version: '6.3', java.version:
'1.8.0_171'
Any help would be appreciated.
Just to give an update on my question. I was able to solve the issue by setting the security setting of the internet explorer to be at the same level. By default, the all zones security is set at different levels. The protected mode is enabled for Internet, Local intranet and Restricted sites. However, it is not enabled for Trusted sites. So, these different levels of security setting confuses the browser, which ends up throwing an error. So, make sure they are either enabled for all or disabled for all, so that they are set at the same level. Just following code should be enough to invoke the browser:
WebDriver driver;
JavascriptExecutor jse;
public static void main(String[] args)
{
ActiveWorkspaceProg run = new ActiveWorkspaceProg();
run.invokeBrowser();
}
public void invokeBrowser()
{
try
{
System.setProperty("webdriver.ie.driver","C:\\Users\\Administrator\\Desktop\\IEDriverServer.exe");
DesiredCapabilities capability = DesiredCapabilities.internetExplorer();
capability.setCapability("ignoreZoomSetting", true);
capability.setCapability(InternetExplorerDriver.
INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
driver = new InternetExplorerDriver();
driver.manage().window().maximize();
driver.manage().deleteAllCookies();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
driver.get("http://localhost:8002/awc/");
}
catch( Exception e)
{
e.printStackTrace();
}
}
}
Look the following link for further understanding
Unable to launch IE browser in selenium webdriver
Recently, bump into this issues with selenium firefox driver.
Thanks in advance
Set UP
os.name: 'Mac OS X',
os.arch: 'x86_64',
os.version: '10.12.6',
java.version: '1.8.0_131'
Firefox version 56.0.1 (64-bit)
Gecko Driver Latest 0.19.0
The error shows failed:
org.openqa.selenium.SessionNotCreatedException: Tried to run command
without establishing a connection
I tried different ways to tackle it but always come with the same error.
1. update all the selenium test driver to the latest
2. specify the directory export PATH = $PATH driverDir
My code
package automationFramework;
import org.apache.commons.io.FileUtils;
import org.junit.*;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.safari.SafariDriver;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
public class GeckoDriver {
private static WebDriver driver;
public static int random = 0;
private String baseURL;
// #BeforeClass : Executes only once for the Test-Class.
#BeforeClass
public static void setting_SystemProperties(){
System.out.println("System Properties seting Key value.");
}
// #Before : To execute once before ever Test.
#Before
public void test_Setup(){
System.out.println("Launching Browser");
if (random == 0) {
System.out.println("Start Chrome Browser Testing ");
System.setProperty("webdriver.gecko.driver", "/Users/Fannity/Desktop/Drivers/geckodriver"); // Chrome Driver Location.
driver = new FirefoxDriver();
}
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
System.out.println("Session ID : " + ((RemoteWebDriver) driver).getSessionId() );
}
#Test
public void selenium_ScreenShot() throws IOException {
baseURL = "https://www.google.com/";
driver.get(baseURL);
System.out.println("Selenium Screen shot.");
File screenshotFile = ((RemoteWebDriver) driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenshotFile, new File("/Users/Fannity/Desktop/JUNIT-Selenium.jpg"));
random += 1;
}
// #After : To execute once after ever Test.
#After
public void test_Cleaning(){
System.out.println("Closing Browser");
baseURL = null;
driver.close();
driver.quit();
}
// #AfterClass : Executes only once before Terminating the Test-Class.
#AfterClass
public static void clearing_SystemProperties(){
System.out.println("System Property Removing Key value.");
System.clearProperty("webdriver.gecko.driver");
}
}
ERROR
https://gist.github.com/Fenici/f82f885486de37ae110fda8d7430df6e
Your problem is here:
#After
public void test_Cleaning(){
System.out.println("Closing Browser");
baseURL = null;
driver.close();
driver.quit();
}
Try only with close().
Explanation here.
We generally get this , if we use driver.close() and driver.quit() together so it would be better if you remove driver.close();
public void test_Cleaning(){
System.out.println("Closing Browser");
baseURL = null;
driver.quit();
}