-
Dec 26th, 2020, 04:49 PM
#1
Thread Starter
New Member
what are the codes waiting to load the page (cefsharp)
Hello there. I am using cefsharp. what are the codes waiting to load the page.
It will then enter username and password.
Later I will have 3 or 4 different transactions on this site.
but I want to load pages in only one function in each process.
I can do this very easily with visual basic webbrowser. but these operation are very difficult in cefsharp
but I've been searching for 2 weeks. but I couldn't make any progress. I'm exhausted
This is the only source I can find (below) I am trying to convert the operation here into a single function. i couldn't do it
https://www.programmersought.com/article/46663520915/
Get HTML code for loading page asynchronously
the code below works great for webbrowser1.
I am looking for the equivalent of this code briefly. but for cefsharp
Code:
Public Sub example()
gotoSiteandWait("https://www.google.co.uk/webhp")
End Sub
Public Sub gotoSiteandWait(ByVal site As String)
wb.Navigate(site)
durum.Text = "Durum: " + wb.ReadyState.ToString + "-" + pageready.ToString
WaitForPageLoad()
durum.Text = "Durum: " + wb.ReadyState.ToString + "-" + pageready.ToString
End Sub
#Region "Sayfa Yükleme Fonksiyonları"
Private Sub WaitForPageLoad()
AddHandler wb.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PageWaiter)
While Not pageready
Application.DoEvents()
End While
pageready = False
End Sub
Private Sub PageWaiter(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
If wb.ReadyState = WebBrowserReadyState.Complete Then
pageready = True
RemoveHandler wb.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PageWaiter)
End If
End Sub
#End Region
Last edited by sertokus; Dec 27th, 2020 at 11:30 AM.
-
Dec 26th, 2020, 05:10 PM
#2
Re: what are the codes waiting to load the page (cefsharp)
I have no idea what the question is. I think you're going to have to explain a bit.
My usual boring signature: Nothing
-
Dec 27th, 2020, 06:20 AM
#3
Thread Starter
New Member
Re: what are the codes waiting to load the page (cefsharp)
Originally Posted by Shaggy Hiker
I have no idea what the question is. I think you're going to have to explain a bit.
i update my tag. Thansk for your interesting
-
Dec 27th, 2020, 08:19 AM
#4
Re: what are the codes waiting to load the page (cefsharp)
please put you code between code tag by selecting you code and clicking on the # button.
why do you have empty sub ?
Code:
Private Sub startBtn_Click(sender As Object, e As EventArgs) Handles startBtn.Click
End Sub
Code:
Private Sub get_html_tick(sender As Object, e As EventArgs) Handles get_html_tm.Tick
End Sub
Ok you have an error. What is the error ? what does it say ?
The best friend of any programmer is a search engine
"Don't wish it was easier, wish you were better. Don't wish for less problems, wish for more skills. Don't wish for less challenges, wish for more wisdom" (J. Rohn)
“They did not know it was impossible so they did it” (Mark Twain)
-
Dec 27th, 2020, 09:26 AM
#5
Thread Starter
New Member
Re: what are the codes waiting to load the page (cefsharp)
Originally Posted by Delaney
please put you code between code tag by selecting you code and clicking on the # button.
why do you have empty sub ?
Code:
Private Sub startBtn_Click(sender As Object, e As EventArgs) Handles startBtn.Click
End Sub
Code:
Private Sub get_html_tick(sender As Object, e As EventArgs) Handles get_html_tm.Tick
End Sub
Ok you have an error. What is the error ? what does it say ?
hi.
I want to go to the site below.
https://www.trendyol.com/Hesabim/IndirimKuponlari
It will then enter username and password.
Later I will have 3 or 4 different transactions on this site.
but I want to load pages in only one function in each process.
I can do this very easily with visual basic webbrowser. but these operation are very difficult in cefsharp
but I've been searching for 2 weeks. but I couldn't make any progress. I'm exhausted
This is the only source I can find (below) I am trying to convert the operation here into a single function. i couldn't do it
https://www.programmersought.com/article/46663520915/
Get HTML code for loading page asynchronously
Last edited by sertokus; Dec 27th, 2020 at 09:33 AM.
-
Dec 27th, 2020, 10:03 AM
#6
Re: what are the codes waiting to load the page (cefsharp)
https://developers.trendyol.com/tr might be a better approach than HTML scraping...
-
Dec 27th, 2020, 11:21 AM
#7
Thread Starter
New Member
Re: what are the codes waiting to load the page (cefsharp)
this code is webbrowser for vb.net
I am looking for the equivalent of this code briefly. but for cefsharp
Code:
Public Sub example()
gotoSiteandWait("https://www.google.co.uk/webhp")
End Sub
Public Sub gotoSiteandWait(ByVal site As String)
wb.Navigate(site)
durum.Text = "Durum: " + wb.ReadyState.ToString + "-" + pageready.ToString
WaitForPageLoad()
durum.Text = "Durum: " + wb.ReadyState.ToString + "-" + pageready.ToString
End Sub
#Region "Sayfa Yükleme Fonksiyonları"
Private Sub WaitForPageLoad()
AddHandler wb.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PageWaiter)
While Not pageready
Application.DoEvents()
End While
pageready = False
End Sub
Private Sub PageWaiter(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)
If wb.ReadyState = WebBrowserReadyState.Complete Then
pageready = True
RemoveHandler wb.DocumentCompleted, New WebBrowserDocumentCompletedEventHandler(AddressOf PageWaiter)
End If
End Sub
#End Region
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|