Basic Browser Commands - Selenium Tutorials

Published: 24 June 2020
on channel: Automation Zone
1,023
40

In the last tutorial we have learnt how to install and create our first program in selenium, now we will understand that code and look at a few more important selenium browser methods in selenium.


Installation Selenium and First Program :-    • Video  

Intro : (0:00)
Understanding first program : (1:11)
Getting page properties title, url and page source: (4:40)
Navigation Commands and Maximize window: (7:38)
Open new Window and Tab : (10:55)

Code:
-----------------------------
System.setProperty("webdriver.chrome.driver", "C:\\selenium\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("https://www.fb.com");
driver.navigate().to("https://www.google.com");
System.out.println(driver.getTitle());
System.out.println(driver.getCurrentUrl());
driver.navigate().back();
driver.navigate().forward();
driver.navigate().refresh();
driver.switchTo().newWindow(WindowType.WINDOW);
driver.manage().window().maximize();
driver.close();
Thread.sleep(1000);
driver.quit();


Watch video Basic Browser Commands - Selenium Tutorials online without registration, duration hours minute second in high quality. This video was added by user Automation Zone 24 June 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,023 once and liked it 40 people.