Giter Site home page Giter Site logo

Comments (6)

mmarsella avatar mmarsella commented on May 28, 2024

Hey Strabbit,

If you log what the output of let frames = await mainTab.getFrames();, what do you get?

I've been using this library a lot lately - so I may be able to help.

M

from simple-headless-chrome.

strabbit avatar strabbit commented on May 28, 2024
[ { id: '21949.1',
    loaderId: '21949.2',
    url: 'http://strabbit.com/frame-example/frameset.html',
    securityOrigin: 'http://strabbit.com',
    mimeType: 'text/html' },
  { id: '21949.2',
    parentId: '21949.1',
    loaderId: '21949.3',
    name: 'the_frame',
    url: 'http://strabbit.com/frame-example/frame.html',
    securityOrigin: 'http://strabbit.com',
    mimeType: 'text/html' } ]

Meaning I'm passing 21949.2 as frame to mainTab.click.

from simple-headless-chrome.

strabbit avatar strabbit commented on May 28, 2024

I've edited the original post. It works for iframes but not for frames in a frameset.

from simple-headless-chrome.

LucianoGanga avatar LucianoGanga commented on May 28, 2024

Hi @strabbit !

I've never used framesets. I think that the problem that you're having is related to how simple-headless-chrome tries to find the correct scope when you pass a frameId:

https://github.com/LucianoGanga/simple-headless-chrome/blob/master/lib/actions.js#L306

Do you know of a website with framesets so we can make a test case for the scenario that you need? We can modify simple-headless-chrome to support those cases.

Thanks!
Lucho

from simple-headless-chrome.

strabbit avatar strabbit commented on May 28, 2024

Thanks @LucianoGanga

http://strabbit.com/frame-example/frameset.html is a very simple frameset example. It's the one I used to verify the issue.

from simple-headless-chrome.

LucianoGanga avatar LucianoGanga commented on May 28, 2024

Thanks!
I'll look into it later. I'll let you know if I can fix and upload an example with that (I'll try to make some extra time to prepare a test case too, just to ensure future compatibility).

Cheers!
Lucho

from simple-headless-chrome.

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.