kiyoon / jupynium.nvim

Selenium-automated Jupyter Notebook that is synchronised with NeoVim in real-time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Using custom renderer

FelixKratz opened this issue · comments

From the documentation I take that Firefox is the only supported renderer because of Selenium:

Firefox (Other browsers are not supported due to their limitation with Selenium)

My question is, what Selenium features would a renderer need to support to be usable with Jupynium?
Basically, I don't want to use Firefox to display the notebook and would be completely fine with creating
a custom solution via WebKit (like this one: https://github.com/FelixKratz/JupyterApp-mac).

I tried with Chrome and Safari.

In Chrome, every time you type and the text gets updated it will focus on Chrome, which makes it unusable.

In Safari, they don't allow you to interact with the browser manually during Selenium automation. It makes it less usable.

Ok thanks, I will see if I can make it work.

How does the web kit work? Does your web kit support Selenium?

You can modify src/jupynium/cmds/jupynium.py and there is a commented arg --browser. You can try and see if something works for you, and let me know if you found something.

Basically WebKit is a way to create a "browser-like" application that has much more access to the web content than a WebDriver. So I think it would be possible to "imitate" the necessary api in an app with a WebKit view, such that it properly conforms to all the Selenium api features you are targeting.

https://developer.apple.com/documentation/webkit

Sounds promising. It seems like you may be able to make webkit version work, but we'll need to migrate all Selenium codes to webkit version.