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. Best Salesforce Copado Robotic Testing Training | VisualpathAuthor: Vamsi Ulavapati
2. Online Igcse Tuitions
Author: Raja Tuitions
3. Isep Foundation Certificate In Environmental Management Exam
Author: Gulf Academy Safety
4. Uk Assignment Help – Making Academic Challenges Manageable
Author: greatassignmenthelpuk
5. Rcdd Certification 2026: Bicsi Requirements, Exam Guide, Training & Preparation
Author: passyourcert net
6. Online Igcse Tuitions Uk
Author: Raja Tuitions
7. Nda Foundation Course After 10th In Delhi: What Students And Parents Should Know
Author: Deepak Sharma
8. Build Your Career In Security And Emergency Response
Author: canarywharfacademy
9. Advance Your Career Through Professional Teaching Qualifications
Author: canarywharfacademy
10. Build Your Future Through Professional Teaching Qualifications
Author: canarywharfacademy
11. Advance Your Professional Skills In Education And Teaching
Author: learnmoreacademy
12. Start Your Professional Journey In Teaching And Education
Author: learnmoreacademy
13. Develop Your Career In Assessment And Quality Assurance
Author: russbridgeacademy
14. Build A Successful Teaching Career Through Professional Training And Development
Author: russbridgeacademy
15. Develop Your Teaching Career With Professional Education And Training Qualifications
Author: russbridgeacademy






