#Web in electron

41 messages · Page 1 of 1 (latest)

jolly siren
#

Is it possible to open a website inside of div element and then working with puppeteer?

torpid zealot
#

You can use BrowserView to display websites
However with puppeter I don't think so
what's it for?

jolly siren
#

It is for displaying a website, where you have to logging first (With the username and passwort)

obsidian arrow
#

Why you need electron for that?

torpid zealot
#

@jolly sirenneed more context

#

what are you trying to do

jolly siren
#

Sure, sorry. In our project, we are building a desktop app for our school. In one of the sections, the school's website should be displayed. For this we use the password and username to log in.

#

The website should be displayed in the red area

torpid zealot
#

For this you can use BrowserView

#

Browserview is not integrated into the web elemtns though, you give it coordinates (x,y, width and height) and it automatically adjusts to that if you want.

#

There is also iframe (builtin to web) and webview (not recommended anymore by electron since its slow and unstable) but it can work in your school app.

jolly siren
#

okay I will look into it

#

thanks

jolly siren
#

Now it comes to an interesting part

#

Do you have an idea how I can manage this now, without useing pupperteer

flint prairie
#

What do you mean by manage?

jolly siren
#

type the username and the password and press Login

obsidian arrow
#

with js

jolly siren
#

Possible without pupperteer?

obsidian arrow
#

possible

torpid zealot
#

you can but i wouldn't

#

I would see how it does the login request and do it yourself. then get the cookie or whatever it gives as credential and "insert" that into the webview

#

THEN you display the website

jolly siren
#

oh this maybe can work

torpid zealot
#

😉

torpid zealot
jolly siren
#

Your right

torpid zealot
#

it's part of the learning process 😁

jolly siren
#

okay I believe the website is down now

#

What have I done

torpid zealot
#

LOL

jolly siren
#

Its back so everything is good 😄

#

Is there a way to communicate with the iframe (webview)?
I will do it with typing and press button

#

Because I will create a effect over it to make a special loading animation

obsidian arrow
#

with ipc

jolly siren
#

But I can't find a way to implement a script that is executing after the page is loaded and then interact with the page

obsidian arrow