Comments (5)
A couple of things:
-
SetControlNavigation may not do what you thing it does (and actually doesn't seem to work with devtools just yet)
-
Found a bug in "NewTab" that actually wasn't opening the new page. Should be fixed now.
-
I am not sure is not working in your example. My test application seems to be working as I would expect.
I have added a couple of new options to my test application:
--tab N allows you to select a specific tab (use --tabs to figure out in which order the tabs are returned)
--new always create a new tab and open a new page in it.
Try my test application and see how it works. If you still have problem you should send some more details information (the list of open tabs, what tab you are trying to activate, etc.)
from godet.
Thank you @raff. I have tried your example and that works. However this still does not do what I expect. I am just trying to open a new tab with google and immediately change it's content to cnn. (It looks quite awkward to get list of Tabs when I just received Tab fro the NewTab method. Besides there is no documentation that restricts the use of the received Tab. Maybe this is just another bug... I hope you get me on this.)
// create new tab
tab, err := remote.NewTab("https://www.google.com")
log.Printf("%v\n", tab)
// activate created tab
err = remote.ActivateTab(tab)
if err != nil {
panic(err)
}
// navigate created tab - navigates wrong tab
_, err = remote.Navigate("https://www.cnn.com")
if err != nil {
panic(err)
}
from godet.
Ok, I think I know what's going on.
It looks like when switching between tabs I also needs to connect to the correct websocket (and disconnect from the previous one).
Will try to get it fixed as soon as possible.
from godet.
Please update and try again. Let me know if this works and/or if you find any other problem.
from godet.
Now it's opening in the same tab as expected. Tested. OK.
from godet.
Related Issues (20)
- get main status code HOT 16
- closing the connection not working. HOT 2
- an enhancement to prevent the code freeze HOT 5
- 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
- Emulate geolocation HOT 5
- 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
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.