opcje binarne robot Prerequisites:

  1. Eclipse (Development Environment)
  2. Selenium Jars (Jars)
  3. Chrome driver/ Firefox driver

http://www.amisdecolette.fr/?friomid=site-de-rencontre-gratuit-pour-france&75d=6a  

  • Launch the eclipse and create new Maven project
  • Add Group Id and Artifact Id and select Finish

click here

  • Right click on the project name from the package explorer and add new class.

http://captainaugust.com/?koooas=broker-opzioni-digitali-in-demo&33e=a9

  • Right click on the project and select build Path –> Configure build path
  • Add the required jars for selenium or use maven repository and configure the .pom file
  • Provide the driver path in the property. Consider the chrome driver
  • http://zenaxy.com/master/2566 System.setProperty(“webdriver.chrome.driver”, “/Users/username/Downloads/chromedriver”)

  • Create an object for chromeDriver.
  • click WebDriver driver = new ChromeDriver();

  • Launch the website using get method.
  • go to site driver.get(“https://facebook.com”);

  • Select the element and perform action.
  • source site driver.findElement(By.id(“signIn”)).sendKeys(“hello@abc.com”);

  • Tap on the errors and import the respective classes from the jars.
  • Finally the Web automation code looks like:
  • go site package org.connecttokc.com.FirstProject; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; public class Test { public static void main(String args[]) throws InterruptedException { System.setProperty(“webdriver.chrome.driver”, “/Users/krishnachaitanya/Downloads/chromedriver”); // WebDriver driver = new FirefoxDriver(); WebDriver driver = new ChromeDriver(); driver.get(“https://facebook.com”); Thread.sleep(5000); driver.findElement(By.linkText(“Sign Up”)).click(); Thread.sleep(1000); driver.findElement(By.id(“signIn”)).sendKeys(“hello@abc.com”); driver.findElement(By.id(“pass”)).sendKeys(“123456”); driver.findElement(By.id(“loginbutton”)).click(); } }

  • Execute/Run the class.
  • This will perform the following actions
    • launch the chrome browser
    • Open facebook page
    • Enter email and password
    • tap on log in button
Categories: Selenium

connecttokc

http://sundekantiner.dk/bioret/761 What I love doing: Identifying and analyzing business problems with technology, convert Traditional testing methodologies to Automation testing using emerging testing technologies.

Leave a Reply

piattaforme trading con opzioni digitali Your email address will not be published. Required fields are marked *