myProfileHandler (#239)
Co-authored-by: Buf Generate <buf-generate@bondee.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user