Imagine that you want to test your web application that uses geolocation in the browser, when it cannot use geolocation. All location-based applications need to support this if you were to get a user who is worried about privacy on certain machines.
setUp()method to load the
OperaProfile profile = new OperaProfile(); profile.preferences().set("Geolocation", "Enable geolocation", false); driver = new OperaDriver(profile);
WebElement element = driver.findElement(By.linkTexxt("Chapter 4"));
public class ...