> For the complete documentation index, see [llms.txt](https://brianwu.gitbook.io/brian/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://brianwu.gitbook.io/brian/brians-za-ji/selenium.md).

# Selenium

可以先人為操作幾次，觀察目標系統的規則，利用程式去取代人為操作。

## 進階

### 擬人

由於許多系統會檢查是否是機器人，但我們又希望利用程式來自動化，不想被檢查出來 就利用程式去去做模仿

#### Random

利用隨機去模仿人的不一致性，倘若每次操作都是間隔60秒，就會相對容易被判斷為機器人，因為人類很難這麼精準。

#### sleep

這邊就會順帶提到另外一個 `wait.until`

因為人的操作不太可能這麼快，比如一秒打60個字

所以用sleep 讓他一秒打一個字，去模仿人的速度

&#x20;**&#x20;*****而 `wait.until()` 則是機器人的速度，一等到東西出來就馬上執行接下來的動作*****&#x20;**&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://brianwu.gitbook.io/brian/brians-za-ji/selenium.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
