Code Monkey home page Code Monkey logo

Comments (5)

raff avatar raff commented on August 12, 2024

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.

honzajde avatar honzajde commented on August 12, 2024

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.

raff avatar raff commented on August 12, 2024

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.

raff avatar raff commented on August 12, 2024

Please update and try again. Let me know if this works and/or if you find any other problem.

from godet.

honzajde avatar honzajde commented on August 12, 2024

Now it's opening in the same tab as expected. Tested. OK.

from godet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.