Hi there ,This is Mohit Kumar . I am an entrepreneur ,Software trainer,IT Job adviser and I am working in MNC as Sr Software engineer. We provide industry Level training (Automation Testing,Core Python Advanced python ,Manual Testing ,Development ....
Saturday, February 22, 2020
Sunday, January 5, 2020
How to Handle Droup Down in Selenium
Example:- 1
package com.basicselenium;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
public class StaticDropdown {
public static void main(String[] args) {
WebDriver driver;
System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
driver=new ChromeDriver();
driver.get("https://www.spicejet.com/");
driver.manage().window().maximize();
Select sel=new Select(driver.findElement(By.id("ctl00_mainContent_DropDownListCurrency")));
sel.selectByIndex(2);
sel.selectByValue("INR");
sel.selectByVisibleText("AED");
}
}
Example:-2
package com.basicselenium;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;
public class HelperClass {
public static WebDriver driver;
public static String url="https://www.spicejet.com/";
public static void launchBrowser(){
try{
System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
driver=new ChromeDriver();
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static void maxmizeBrowser(){
try{
driver.manage().window().maximize();
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static void getUrl(){
try{
driver.get(url);
}
catch (Exception e) {
System.out.println(e.getMessage());
}
}
public static void clickAdlt(){
driver.findElement(By.id("divpaxinfo")).click();
Select sel_adalt=new Select(driver.findElement(By.id("ctl00_mainContent_ddl_Adult")));
sel_adalt.selectByIndex(5);
Select sel_child=new Select(driver.findElement(By.id("ctl00_mainContent_ddl_Child")));
sel_adalt.selectByValue("3");
Select infant=new Select(driver.findElement(By.id("ctl00_mainContent_ddl_Infant")));
infant.selectByIndex(3);
}
}
---------------
public WebDriver driver;
//public DroupDownupdated(WebDriver driver){
//this.driver=driver;
//}
@Test()
public void tc_01(){
//WebDriver driver = null;
HelperClass.launchBrowser();
//driver=new ChromeDriver();
//System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
//driver.get("https://www.spicejet.com/");
//driver.manage().window().maximize();
HelperClass.getUrl();
HelperClass.maxmizeBrowser();
//driver.findElement(By.id("divpaxinfo")).click();
HelperClass.clickAdlt();
}
}
How to Handle Suggestion Drop Down
==============================
package com.basicseenum1;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class VerifyDropDown {
public static void main(String[] args) throws InterruptedException {
WebDriver driver;
System.setProperty("webdriver.chrome.driver","F:\\chromedriver.exe");
driver=new ChromeDriver();
driver.get("https://www.makemytrip.com/");
driver.manage().window().maximize();
driver.findElement(By.id("fromCity")).click();
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys("Hyd");
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys(Keys.ARROW_DOWN);
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys(Keys.ENTER);
Thread.sleep(2000);
//driver.findElement(By.id("toCity")).click();
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys("PAT");
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys(Keys.ARROW_DOWN);
Thread.sleep(2000);
driver.findElement(By.xpath("//div[@id='react-autowhatever-1']/preceding::input[1]")).sendKeys(Keys.ENTER);
Thread.sleep(2000);
}
}
Saturday, January 4, 2020
How to upload file in Selenium and How to make dynamic path location
package com.autoit;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
public class FileUpload {
public static void main(String[] args) throws InterruptedException, IOException {
try{
WebDriver driver;
String downloadPath=System.getProperty("user.dir");//using this steps we will get System path means project path F:\MyWorkSpace\Selenium_Batch_2018
System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
//By using below line of code to copy the downlaod file in project locations
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("download.default_directory",downloadPath);
ChromeOptions options=new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
driver=new ChromeDriver(options);
driver.get("https://www.ilovepdf.com/word_to_pdf");
driver.findElement(By.xpath("//span[contains(text(),'Select WORD files')]")).click();
Thread.sleep(3000);
Runtime.getRuntime().exec("D:\\fileupload.exe");
Thread.sleep(3000);
// WebElement ele =driver.findElement(By.id("processTask")).click();
WebElement ele=driver.findElement(By.cssSelector("#processTask"));
Actions act=new Actions(driver);
act.moveToElement(ele).click().build().perform();
Thread.sleep(3000);
//driver.findElement(By.id("pickfiles")).click();
File f=new File(downloadPath+"/Resume.pdf");
if(f.exists()){
System.out.println("File is downloaded");
if(f.delete()){
System.out.println("File is delated");
}
}
else{
System.out.println("File is not downloaded");
}
System.out.println("***Test case is passed***");
}
catch(Exception e){
System.out.println(e.getMessage());
}
//driver.close();
}
}
=========================================================================
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.interactions.Actions;
public class FileUpload {
public static void main(String[] args) throws InterruptedException, IOException {
try{
WebDriver driver;
String downloadPath=System.getProperty("user.dir");//using this steps we will get System path means project path F:\MyWorkSpace\Selenium_Batch_2018
System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe");
//By using below line of code to copy the downlaod file in project locations
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("profile.default_content_settings.popups", 0);
chromePrefs.put("download.default_directory",downloadPath);
ChromeOptions options=new ChromeOptions();
options.setExperimentalOption("prefs", chromePrefs);
driver=new ChromeDriver(options);
driver.get("https://www.ilovepdf.com/word_to_pdf");
driver.findElement(By.xpath("//span[contains(text(),'Select WORD files')]")).click();
Thread.sleep(3000);
Runtime.getRuntime().exec("D:\\fileupload.exe");
Thread.sleep(3000);
// WebElement ele =driver.findElement(By.id("processTask")).click();
WebElement ele=driver.findElement(By.cssSelector("#processTask"));
Actions act=new Actions(driver);
act.moveToElement(ele).click().build().perform();
Thread.sleep(3000);
//driver.findElement(By.id("pickfiles")).click();
File f=new File(downloadPath+"/Resume.pdf");
if(f.exists()){
System.out.println("File is downloaded");
if(f.delete()){
System.out.println("File is delated");
}
}
else{
System.out.println("File is not downloaded");
}
System.out.println("***Test case is passed***");
}
catch(Exception e){
System.out.println(e.getMessage());
}
//driver.close();
}
}
=========================================================================
Saturday, December 28, 2019
Selenium Real Time Project
Hi there ,
Now I have added Selenium Live project .In session I will be cover
1)Important topic of java like Collection, String,OOP concept .
2)Logical programming which is asked in Interview .
3)Frame work component and Development of framework
4)Resume Preparation as experience what project you have to mentioned
5)Demo Interview Preparation with Real Time expert
course fee is only 2500/
duration 3 weeks
Now I have added Selenium Live project .In session I will be cover
1)Important topic of java like Collection, String,OOP concept .
2)Logical programming which is asked in Interview .
3)Frame work component and Development of framework
4)Resume Preparation as experience what project you have to mentioned
5)Demo Interview Preparation with Real Time expert
course fee is only 2500/
duration 3 weeks
Friday, December 20, 2019
Going to Start New Batch for Core java Selenium + Python Selenium + Data Analysis
We provide Real Time hands on Training as Experience level. ...We have record of 100% Placement with good package.Our agenda is Your Success is Our Success.(If you will not get placement 100% fee is refundable)
New Batch is going to Start on 4th Jan(offline/online Session Weekdays/Weekend ) for Automation Testing ,Manual Testing,Core python+Advanced python
1)Core java + Selenum WebDriver + RealTime Project
Syllabus :- https://ingenioustechhub.blogspot.com/2019/12/my-syllabus.html
2)Core python + Advanced python + Selenum WebDriver+ Real Time Project
Syllabus:- https://ingenioustechhub.blogspot.com/2019/12/python-selenium-syllabus.html
3)Manual Testing + RealTime Project
Syllabus:- https://ingenioustechhub.blogspot.com/2019/12/python-selenium-syllabus.html
4)RealTime Project(Automation Testing-->Development of framework)
Real Time Interview preparation with IT expert (We will support you until u will get placed )
Timing 7:00:am to 8:00am (Daily Session),3:00 pm to 5:00 pm IST ,8pm to 10 pm IST ( Free Demo Class ).Don't miss demo class refer your friend also
Passout(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019)
Timing
7:00:am to 7:45 am Ist (Weekdays) (Core java + Selenum WebDriver + RealTime Project)
7:00:am to 7:45 am Ist (Weekdays) Core python + Advanced python + Selenum WebDriver+ Real Time Project)
3:00 pm to 5:00 pm IST(Weekend) Core python + Advanced python + Selenum
WebDriver+ Real Time Project
10 am to 12 pm IST ( Weekend ). Core java + Selenum WebDriver + RealTime Project
Don't miss demo class refer your friend also )
Duration 45 days
For Registraton contact below mentioned no...
Mobno-7829471985,6362190671.
Weekdays and weekend batch is available
Address:- LandMark :- Naranaya Medical College Near Libarary Park.
SR Nagar(AndharaBank) Main Rd, Srinivasa Nagar, Sanjeeva Reddy Nagar, Hyderabad, Telangana 500038
https://www.youtube.com/channel/UC0GLi8ttkIr1VvDk7EVCuIg?view_as=subscriber
https://www.facebook.com/ingenious123/?ref=bookmarks
https://www.facebook.com/groups/108383303164936/?ref=bookmarks
New Batch is going to Start on 4th Jan(offline/online Session Weekdays/Weekend ) for Automation Testing ,Manual Testing,Core python+Advanced python
1)Core java + Selenum WebDriver + RealTime Project
Syllabus :- https://ingenioustechhub.blogspot.com/2019/12/my-syllabus.html
2)Core python + Advanced python + Selenum WebDriver+ Real Time Project
Syllabus:- https://ingenioustechhub.blogspot.com/2019/12/python-selenium-syllabus.html
3)Manual Testing + RealTime Project
Syllabus:- https://ingenioustechhub.blogspot.com/2019/12/python-selenium-syllabus.html
4)RealTime Project(Automation Testing-->Development of framework)
Real Time Interview preparation with IT expert (We will support you until u will get placed )
Timing 7:00:am to 8:00am (Daily Session),3:00 pm to 5:00 pm IST ,8pm to 10 pm IST ( Free Demo Class ).Don't miss demo class refer your friend also
Passout(2010,2011,2012,2013,2014,2015,2016,2017,2018,2019)
Timing
7:00:am to 7:45 am Ist (Weekdays) (Core java + Selenum WebDriver + RealTime Project)
7:00:am to 7:45 am Ist (Weekdays) Core python + Advanced python + Selenum WebDriver+ Real Time Project)
3:00 pm to 5:00 pm IST(Weekend) Core python + Advanced python + Selenum
WebDriver+ Real Time Project
10 am to 12 pm IST ( Weekend ). Core java + Selenum WebDriver + RealTime Project
Don't miss demo class refer your friend also )
Duration 45 days
For Registraton contact below mentioned no...
Mobno-7829471985,6362190671.
Weekdays and weekend batch is available
Address:- LandMark :- Naranaya Medical College Near Libarary Park.
SR Nagar(AndharaBank) Main Rd, Srinivasa Nagar, Sanjeeva Reddy Nagar, Hyderabad, Telangana 500038
https://www.youtube.com/channel/UC0GLi8ttkIr1VvDk7EVCuIg?view_as=subscriber
https://www.facebook.com/ingenious123/?ref=bookmarks
https://www.facebook.com/groups/108383303164936/?ref=bookmarks
Subscribe to:
Posts (Atom)
Q) How To Find Duplicate Characters In A String In Java?
Step1:- Creating a HashMap containing char as key and it's occurrences as value. Step2:- Converting given string to char array. Step3:- ...
-
Our Syllabus =========================== Core java syllabus =================== A) Java Fundamentals:- ---------------------...
-
API Testing Syllabus for Manual & Automation ====================================== 1)Introduction of The Postman Tool 2)Installation...
-
Step1:- Creating a HashMap containing char as key and it's occurrences as value. Step2:- Converting given string to char array. Step3:- ...
