myProfileHandler (#239)

Co-authored-by: Buf Generate <buf-generate@bondee.com>
This commit is contained in:
Carlo
2025-10-16 21:17:28 +08:00
committed by GitHub
parent 23f85616b4
commit 844ff8c102
5 changed files with 92 additions and 0 deletions

View File

@@ -23,3 +23,23 @@ func (n *NavigateAction) ToExplorePage(ctx context.Context) error {
return nil
}
func (n *NavigateAction) ToProfilePage(ctx context.Context) error {
page := n.page.Context(ctx)
// First navigate to explore page
if err := n.ToExplorePage(ctx); err != nil {
return err
}
page.MustWaitStable()
// Find and click the "我" channel link in sidebar
profileLink := page.MustElement(`div.main-container li.user.side-bar-component a.link-wrapper span.channel`)
profileLink.MustClick()
// Wait for navigation to complete
page.MustWaitLoad()
return nil
}