Showing posts with label webdriver. Show all posts
Showing posts with label webdriver. Show all posts

Saturday, January 28, 2017

[TIPS] Selenium Implicit Wait - Turn ON and OFF

While automating web application Selenium Webdriver Implicit wait is applied to all findElement and findElements keyword till the element is visible. But in some case we need to check if fields visibility immediately on performing some actions. So why to wait for default implicit wait of 15 or 30 seconds.

Here is the simple tip to override Implicit default wait time by Turning OFF the implicit wait while performing action and validating field visibility. Below Java code snippet will be helpful -

 public void turnOFFImplicitWait(Webdriver driver)  {  
   driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);  
 }  

After verifying the step turn ON default implicit wait as below -
 public void turnONImplicitWait(Webdriver driver)  {  
   driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);  
 }  

Thursday, March 17, 2016

Demo Practice website for Selenium Automation Testing

Here are some demo sites for learning Selenium Automation Testing using Selenium IDE or Selenium RC (Selenium Remote control) or Selenium Webdriver.

E-commerce website - http://store.demoqa.com/
Basic fields demo portal - http://demoqa.com/
Automation demo web page practice - http://toolsqa.com/automation-practice-form/
Switch window - http://toolsqa.com/automation-practice-switch-windows/
Handling browsers alerts - http://toolsqa.com/handling-alerts-using-selenium-webdriver/
iFrame practice - http://toolsqa.com/iframe-practice-page/

Read CSV from S3

 import csv def count_records(csv_file):     record_count = 0     first_line = None     last_line = None     # Open the CSV file and read it...