didn't that code work for you ?anhnha wrote: ↑07 Dec 2022, 16:14I'm not sure why you keep saying that it does not create blank page.Code: Select all
This will not create blank page
I did try that many times and it didn't work for me. I also I captured result that it still opened with a page called data; in my previous post.
image.png
And this again does not work as well. I want to delete about:blank#blocked but all the suggestions so far sometimes delete the wrong tab or not delete any tab at all.Code: Select all
/* ; this is wrong session:= Chrome.getSession(1) Page.close(session) */ Session:= Chrome.getSession(1) Session.close()
I would be more than happy if this work but normally it does not as you don't give a complete example to show how it work so many times I get confused between pages/tabs/sessions and even sessions and Session.please Read documentation for basic tasks
I have been trying to read definitions in function definition as well.
So far none of the methods you said above works.
Does it work on your PC or just me?
I tried it on two PC but none of them work.
Here is the image showing that it does not work and error.
image.png
image.png
And another time, with exactly same code above, it deleted the wrong page. The blank page is still there.
Chrome.getSessionByUrl("about:Blank") works but I'm looing for a solution to not generate the blank page instead of just create and then remove.Code: Select all
Session:= Chrome.getSessionByUrl("about:Blank") Session.close()
That is why I asked if that blank page is required.
You can disable that line but no help, it created a different blank page.
Code: Select all
Chrome := new Rufaydium()
urls := ["https://www.autohotkey.com/boards/viewforum.php?f=4","https://chromedevtools.github.io/devtools-protocol","https://github.com/Xeo786/Rufaydium-Webdriver"]
Page := Chrome.NewSession()
; Page.url := "about:Blank" ; this line has been disabled
for i, url in urls
Page.CDP.CreateTarget(url)