Showing posts with label chrome. Show all posts
Showing posts with label chrome. Show all posts

Wednesday, 12 February 2020

macOS - selenium with chrome browser




download chromedriver.exe and run below code - rest all same as windows


@org.testng.annotations.Test
public void m2() {
System.setProperty("webdriver.chrome.driver",
"/Users/kk/Documents/workspace/test/driver/chromedriver");
WebDriver driver = new ChromeDriver();
driver.get("http://www.facebook.com");

}

Thursday, 29 June 2017

First selenium programme with python

prerequisites:

1.python software
2.install selenium over python
3.download chrome driver
4.IDE for python code: pycharm


FacebookTest.py

from selenium import webdriver
driver = webdriver.Chrome("C:/forSelenium/chromedriver.exe")
driver.get("http://www.facebook.com")