2

There is a page with a lot of buttons. I want to jump through them in order to get the content of the page and search for elements in it. What should I do?


func GetOrders(result *[]tools.Order) chromedp.Tasks {

    var currentUrL string

    var nodes []*cdp.Node


    return chromedp.Tasks{

        chromedp.Navigate(Url),

        //chromedp.Evaluate("document.querySelector('#J_Static2Quick').click();", &res),

        chromedp.Location(&currentUrL),

        chromedp.Nodes(".js-order-container", &nodes, chromedp.ByQueryAll),

        chromedp.ActionFunc(func(ctx context.Context) error {



            count := len(nodes)
            fmt.Println("count:", count)

            for _, v := range nodes {

                // todo search button and  click

            }

            return  nil
        }),


    }
}
lnmput
  • 53
  • 5

0 Answers0