123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Education >> View Article

Selenium Webdriver Methods- Selenium Online Training

Profile Picture
By Author: Sanaya
Total Articles: 19
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

1. Creating New Instance Of Firefox Driver – this will open an new Empty browser
WebDriver driver = new FirefoxDriver();
2. Command To Open URL In Browser
driver.get(“http://selenium-suresh.blogspot.com”);
This syntax will open specified URL of software web application in web browser.
3. Clicking on any element or button of webpage
driver.findElement(By.id(“id of any element or button”)).click();
4. Store text of targeted element in variable – This will retrieve text from targeted element of software web application page and will store it in variable = suresh
String suresh = driver.findElement(By.tagName(“select”)).getText();
5. Typing text in text box or text area.
driver.findElement(By.name(“txtboxname”)).sendKeys(“My First Name”);
6. Applying Implicit wait in webdriver – This syntax will force webdriver to wait for 15 seconds if an element not found on the page of a software web application.
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
7. Applying Explicit wait in webdriver – This will wait for 15 ...
... seconds for the expected text “Time left: 7 seconds” to appear on the targeted element.
WebDriverWait wait = new WebDriverWait(driver, 15);
wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath(“xpathofelement”), “Time left: 7 seconds”));
8. Get page title in selenium webdriver
driver.getTitle();
9. Get the Current Page URL In Selenium WebDriver- It will retrieve the current page URL and you can use it to compare with your expected URL.
driver.get current URL();
10. Get domain name using javascript executor – This will retrieve your software application’s domain name using web driver's java script executor interface and store it into the variable.
JavascriptExecutor javascript = (JavascriptExecutor) driver;
String CurrentURLUsingJS=(String)javascript.executeScript(“return document.domain”);

For more details please visit: https://nareshit.com/selenium-online-training/

Total Views: 222Word Count: 229See All articles From Author

Add Comment

Education Articles

1. Devops: The Modern Skillset Every Tech Professional Should Master
Author: safarisprz01

2. Salesforce Marketing Cloud Training In India | Cloud
Author: Visualpath

3. How An English Medium School Shapes A Child’s Future In Today’s Global World
Author: Mount Litera Zee School

4. Mern Stack Online Training In Ameerpet | Mern Stack Ai Training
Author: Hari

5. Why Online Courses In Sap Sd Are The Best Solution For Today's Professionals
Author: ezylern

6. Sailpoint Online Course In Bangalore For Professionals
Author: Pravin

7. Sap Ai Course | Sap Ai Online Training In Hyderabad
Author: gollakalyan

8. Why Aima Is The Best Choice For A Global Advanced Management Programme
Author: Aima Courses

9. The Best Oracle Integration Cloud Online Training
Author: naveen

10. Mlops Training Course In Chennai | Mlops Training
Author: visualpath

11. International Cbse School In Nallagandla,
Author: Johnwick

12. Best Mba Dual Specialization Combinations For 2025 And Beyond
Author: IIBMS Institute

13. Top Docker Kubernetes Training In Hyderabad | Docker And Kubernetestop Docker Kubernetes Training In Hyderabad | Docker And Kubernetes
Author: krishna

14. Full Stack Web Development Course In Noida
Author: Training Basket

15. Master Advanced Pega Skills With Pega Cssa Infinity'24.2 Online Training By Pegagang
Author: PegaGang

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: