Difference between webdriver.get() and webdriver.navigate()

前端 未结 14 1460
悲哀的现实
悲哀的现实 2020-11-28 04:27

What is the difference between get() and navigate() methods? Does any of this or maybe another method waits for page content to load? What do I rea

14条回答
  •  一整个雨季
    2020-11-28 04:40

    To get a better understanding on it, one must see the architecture of Selenium WebDriver.

    Just visit https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol

    and search for "Navigate to a new URL." text. You will see both methods GET and POST.

    Hence the conclusion given below:

    driver.get() method internally sends Get request to Selenium Server Standalone. Whereas driver.navigate() method sends Post request to Selenium Server Standalone.

    Hope it helps

提交回复
热议问题