selenium interview questions for experienced professionals code example
Example 1: selenium interview questions 2019
// Set up the JavaScript object
JavascriptExecutor jscript = (JavascriptExecutor) webdriver;
// Read the site title
String strTitle = (String)jscript.executeScript("return document.title");
System.out.println("Webpage Title: " + strTitle);
Example 2: selenium interview questions 2019
from selenium import webdriver
PROXY = "10.0.0.10:8080" # IP:PORT or HOST:PORT
chrome_opt = webdriver.ChromeOptions()
chrome_opt.add_argument('--proxy-server=%s' % PROXY)
chrome = webdriver.Chrome(options=chrome_opt)
chrome.get("<< target URL >>")