What's the Point of Selenium?

后端 未结 15 1521
孤街浪徒
孤街浪徒 2021-01-30 07:13

Ok, maybe I\'m missing something, but I really don\'t see the point of Selenium. What is the point of opening the browser using code, clicking buttons using code, and checking f

15条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-30 08:04

    Selenium (along with similar tools, like Watir) lets you run tests against the user interface of your Web app in ways that computers are good at: thousands of times overnight, or within seconds after every source checkin. (Note that there are plenty of other UI testing pieces that humans are much better at, such as noticing that some odd thing not directly related to the test is amiss.)

    There are other ways to involve the whole stack of your app by looking at the generated HTML rather than launching a browser to render it, such as Webrat and Mechanize. Most of these don't have a way to interact with JavaScript-heavy UIs; Selenium has you somewhat covered here.

提交回复
热议问题