Results 1 to 7 of 7

Thread: what are the codes waiting to load the page (cefsharp)

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2020
    Posts
    9

    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.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,043

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2020
    Posts
    9

    Re: what are the codes waiting to load the page (cefsharp)

    Quote Originally Posted by Shaggy Hiker View Post
    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

  4. #4
    Fanatic Member Delaney's Avatar
    Join Date
    Nov 2019
    Location
    Paris, France
    Posts
    845

    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)

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2020
    Posts
    9

    Re: what are the codes waiting to load the page (cefsharp)

    Quote Originally Posted by Delaney View Post
    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.

  6. #6
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,474

    Re: what are the codes waiting to load the page (cefsharp)

    https://developers.trendyol.com/tr might be a better approach than HTML scraping...

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2020
    Posts
    9

    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
  •  



Click Here to Expand Forum to Full Width