CDPClient.sendMessage(
MessageBuilder.buildGeoLocationMessage(id, 37.422290, -122.084057));
// под капотом
method = "Emulation.setGeolocationOverride";
params = new HashMap<>();
params.put("latitude", latitude);
params.put("longitude", longitude);
params.put("accuracy", 100);
if (debug) {
System.err.println(String.format(
"Sending:\n{\"id\":%s,\"method\":\"Emulation.setGeolocationOverride\","
+ "\"params\":{\"latitude\":%s,\"longitude\":%s,\"accuracy\":100}}",
id, latitude, longitude));
}
// google HQ
sleep(3);
URL = "https://www.google.com.sg/maps";
driver.navigate().to(URL);
driver.findElement(By.cssSelector(
"div[class *='widget-mylocation-button-icon-common']"), 120)
.click();
sleep(10);
takeScreenShot();
}
mvn tomcat:run-war
mvn tomcat7:run
?$filename = ([String]::join('',[String]::join('', @([char]0x043f,[char]0x0440,[char]0x0438,[char]0x0432,[char]0x0435,[char]0x0442)),'.txt'))
..\vagrant> new-item -path $filename
Directory: vagrant
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 9/7/2020 1:13 PM 0 привет.txt
vagrant up ; vagrant ssh
node:~$ ls /vagrant/
Vagrantfile привет.txt