ALL >> Education >> View Article
Selenium Webdriver Methods- Selenium Online Training
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/
Add Comment
Education Articles
1. Data Science Course With Job Assistance: Building Skills For A Career In AiAuthor: BIA
2. Gemstone Wisdom: How To Understand, Choose And Wear Traditional Astrological Stones
Author: Narendra Sharma
3. How To Crack Neet 2027: Mock Tests, Previous Year Papers And Ai Practice
Author: Sarthaks eConnect
4. Mlops Online Course And Mlops Training In Ameerpet
Author: Subahan
5. Best Ai Product Management Training | Visualpath
Author: Visualpath
6. How Can Ai Turn Sap Data Into Business Insights
Author: golla kalyan
7. D365 Finance And Operations Training | D365 Training
Author: Hari
8. Forward Deployment Engineering Course | Visualpath
Author: Vamsi Ulavapati
9. Power Bi Training With Ai | Power Bi Classes Online
Author: Visualpath
10. Cissp Certification Guide 2026: Exam, Requirements, Training, And Preparation Strategy
Author: passyourcert net
11. Build Your Career With Practical Sap Training At Avina Technologies, Hyderabad
Author: Avina Technologies
12. Asphalt Calculator: Calculate Asphalt Quantity, Weight, And Cost Easily
Author: agecalculatot
13. How To Teach Young Children Who Can Not Read Junior Bible Quiz Questions
Author: JBQ Companion
14. Singapore Student Visa 2027: Complete Guide For Indian Students
Author: Nivesa EdTech
15. Sap Cloud Platform Integration Training | Sap Cloud Platform
Author: Visualpath






