Skip to content

Instantly share code, notes, and snippets.

@ysmood
Last active December 10, 2020 08:36
Show Gist options
  • Save ysmood/efc7449e162e11dc96fd6a775237ff65 to your computer and use it in GitHub Desktop.
Save ysmood/efc7449e162e11dc96fd6a775237ff65 to your computer and use it in GitHub Desktop.
package main
import (
"os"
"github.com/go-rod/rod"
"github.com/go-rod/rod/lib/input"
"github.com/go-rod/rod/lib/utils"
)
func main() {
email := os.Getenv("email")
passwd := os.Getenv("passwd")
page := rod.New().MustConnect().MustPage("https://id.jobcan.jp/users/sign_in")
page.MustElement("#user_email").MustInput(email)
page.MustElement("#user_password").MustInput(passwd).MustPress(input.Enter)
waitPage := page.MustWaitOpen()
page.MustWaitLoad().MustElementR("a", "勤怠").MustClick()
waitPage().MustElement("#adit-button-push").MustClick()
utils.Pause()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment