Comments (5)
That should work, how are you testing this?
from godet.
example
err := setGeolocationOverride(remote, 34.052235, -118.243683, 5.0)
if err != nil {
fmt.Println(id, "cannot set geolocation override:", err)
return
}
remote.Evaluate(`function geoFindMe() {
var output = document.getElementById("elemId");
if (!navigator.geolocation){
output.innerHTML = "<p>Geolocation is not supported by your browser</p>";
return;
}
function success(position) {
var latitude = position.coords.latitude;
var longitude = position.coords.longitude;
output.innerHTML = '<p>Latitude is ' + latitude + '° <br>Longitude is ' + longitude + '°</p>';
var img = new Image();
img.src = "http://maps.googleapis.com/maps/api/staticmap?center=" + latitude + "," + longitude + "&zoom=13&size=300x300&sensor=false";
output.appendChild(img);
};
function error(err) {
output.innerHTML = "Unable to retrieve your location" + err.message;
};
output.innerHTML = "<p>Locating…</p>";
navigator.geolocation.getCurrentPosition(success, error);
};
geoFindMe();`)
from godet.
Maybe try adding a time.Sleep(time.Second)
after the call to setGeolocationOverride
. Just a guess.
from godet.
looks like found problem, I did it before
remote.NewTab(url)
from godet.
thanks
from godet.
Related Issues (20)
- How to handle multiple alert? HOT 4
- remote.CallbackEvent can not work on remote.NewTab HOT 3
- leaking goroutines HOT 1
- Error when connecting to local host HOT 4
- how to make chrome load all resources of the page? HOT 9
- GetResponseBody bug HOT 1
- Can't run basic example - dependency issue HOT 1
- dependency issue httpclient reporting error HOT 1
- Have the `Connect` interface receive a map of headers HOT 1
- Open multiple profiles on multiple tabs HOT 2
- Custom proxy for every tab.
- Sending selenium commands HOT 1
- Control in a separate window HOT 1
- remote.FullfillRequest not working HOT 2
- Interface Conversion Error upon calling remote.SetCookie HOT 2
- Page event seem be not triggered HOT 2
- how to set "download_restrictions" by godet? HOT 1
- remote.FulfillRequest problem HOT 6
- Is this hub give the method to generate a HAR file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godet.