{"id":261762,"date":"2015-07-17T20:24:02","date_gmt":"2015-07-17T16:24:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=261762"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=261762","title":{"rendered":"\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Selenium WebDriver, Python, \u0438 Behave"},"content":{"rendered":"<p>     \t<cut\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <br \/>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Selenium WebDriver \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Behave.<br \/>  \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <cut\/>  <\/p>\n<h2>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c<\/h2>\n<p>   \u0422\u0443\u0442 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043a\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0438 \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 selenium webdriver, \u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0433\u043e\u043d\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c behave.<\/p>\n<h2>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f python. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.python.org\/downloads\/\">\u0442\u0443\u0442<\/a>. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 2.7.6, \u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u041a\u0440\u043e\u043c\u0435 python \u043d\u0430\u043c \u0435\u0449\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f selenium \u0438 \u0441\u0430\u043c behave. <br \/>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c selenium \u043c\u043e\u0436\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/pypi.python.org\/pypi\/pip\/7.1.0\">pip<\/a>:<br \/>  <code> pip install selenium <\/code>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 selenium?<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u0430\u043a \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 wiki:<br \/>  <code> Selenium \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <\/code><br \/>  \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e \u043d\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/152653\/\">\u0442\u0443\u0442<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/248559\/\">\u0438 \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e Selenium \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c: <br \/>  <a href=\"http:\/\/www.seleniumhq.org\/docs\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><br \/>  <a href=\"http:\/\/selenium2.ru\/docs.html\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a><br \/>  <a href=\"http:\/\/selenium-python.readthedocs.org\/index.html\">\u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f selenium with python<\/a><br \/>  <a href=\"http:\/\/selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f selenium with python<\/a>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c behave. \u041c\u043e\u0436\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c pip: <br \/>  <code> pip install behave <\/code><br \/>  \u0410 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0442: <a href=\"https:\/\/pypi.python.org\/pypi\/behave\">behave \u043d\u0430 pypi<\/a><br \/>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 behave? Behave \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 python-\u0441\u0442\u0438\u043b\u0435(<a href=\"http:\/\/habrahabr.ru\/post\/216923\/\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Behavior-driven development?<\/a>).<br \/>  Behave \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u043d\u0430 python. <br \/>  \u041e\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438:<\/p>\n<p>  + \u041b\u0435\u0433\u043a\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<br \/>  + \u041e\u0442\u0447\u0435\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit<br \/>  + \u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<br \/>  + \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 jenkins (\u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 CI, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0442\u043e\u0436\u0435)<\/p>\n<p>  <a href=\"http:\/\/pythonhosted.org\/behave\/comparison.html\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 behave \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/a><br \/>  \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h2>2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<p>  \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c: <br \/>  1. \u0424\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .feature \u2014 \u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u044b.<br \/>  2. \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e steps, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0430\u0439\u043b\u044b .py \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0433\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b, \u043d\u0430 python.<\/p>\n<p>  \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443 steps \u0444\u0430\u0439\u043b \u2014 environment.py c \u043a\u043e\u0434\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0442\u0435\u0441\u0442\u0435. <br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <a href=\"http:\/\/pythonhosted.org\/behave\/tutorial.html#environmental-controls\">\u0442\u0443\u0442<\/a>.<br \/>  \u041d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b.<\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u0438: <\/p>\n<p>  features\/ <br \/>  features\/everything.feature<br \/>  features\/steps\/<br \/>  features\/steps\/steps.py<\/p>\n<p>  <a href=\"http:\/\/pythonhosted.org\/behave\/tutorial.html\">\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 behave tutorial<\/a><br \/>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442!<\/p>\n<h2>3. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 steps, \u0444\u0430\u0439\u043b c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .py, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<br \/>  \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b first_test.py.<br \/>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0435\u0439\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u044b ya.ru.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0432 \u0444\u0430\u0439\u043b firs_test.py.  <\/p>\n<pre><code class=\"python\"># -*- coding: utf-8 -*- from behave import * from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time  #\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. @given('website &quot;{url}&quot;') def step(context, url): #\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435     context.browser = webdriver.Firefox()     context.browser.maximize_window()     context.browser.get(&quot;http:\/\/ya.ru&quot;)  #\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;\u041d\u0430\u0439\u0442\u0438&quot; @then(&quot;push button with text '{text}'&quot;) def step(context, text):     WebDriverWait(context.browser, 120).until(         EC.element_to_be_clickable((By.XPATH, '\/\/button'))     )     context.browser.find_element_by_xpath('\/\/button').click()  #\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 @then(&quot;page include text '{text}'&quot;) def step(context, text):     WebDriverWait(context.browser, 120).until(         EC.presence_of_element_located((By.XPATH, '\/\/*[contains(text(), &quot;%s&quot;)]' % text))     )     assert context.browser.find_element_by_xpath('\/\/*[contains(text(), &quot;%s&quot;)]' % text)     context.browser.quit() <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434, \u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0430\u043a\u0430\u044f:<br \/>  1. \u041e\u0442\u043a\u0440\u044b\u0442\u044c ya.ru<br \/>  2. \u041a\u043b\u0430\u0446\u043d\u0443\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041d\u0430\u0439\u0442\u0438\u00bb<br \/>  3. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0434\u0430\u0447\u0438 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442: \u00ab\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u00bb<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c \u0442\u0435\u0441\u0442.<br \/>  \u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439 steps \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b .feature, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438: <\/p>\n<pre><code class=\"html\">#\u0423\u043a\u0430\u0436\u0435\u043c \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0444\u0438\u0447\u0430 Feature: Checking search #\u0423\u043a\u0430\u0436\u0435\u043c \u0438\u043c\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f (\u0432 \u043e\u0434\u043d\u043e\u0439 \u0444\u0438\u0447\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e) Scenario: \u0421heck some text in search results #\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u0448\u0430\u0433\u0438.   Given website &quot;ya.ru&quot;   Then push button with text '\u041d\u0430\u0439\u0442\u0438'   Then page include text '\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441' <\/code><\/pre>\n<p>  \u0428\u0430\u0433\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u0430, \u043f\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u0432\u044f\u0436\u0443\u0442\u0441\u044f \u0441 python \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. (\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0437\u043d\u0430\u043a\u043e\u043c @)<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u0442\u0435\u0441\u0442.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443, \u0433\u0434\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:   <\/p>\n<pre><code class=\"html\">behave -i first_test.feature <\/code><\/pre>\n<p>  \u0424\u043b\u0430\u0433 -i \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u043e\u0434 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u043e\u0438\u0441\u043a\u0430.<br \/>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c c \u0444\u043b\u0430\u0433\u043e\u043c &#8212;junit \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0442\u0447\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043e\u0442\u0447\u0435\u0442 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"html\"> Feature: Checking search # first_test.feature:1    Scenario: Send some text in search box and check some text in search results  # ya.feature:2     Given website &quot;ya.ru&quot;                                                       # steps\/test.py:9 0.662s     Then push button with text '\u041d\u0430\u0439\u0442\u0438'                                          # steps\/test.py:14 0.242s     Then page include text '\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441'                      # steps\/test.py:22 1.009s  1 feature passed, 0 failed, 0 skipped 1 scenario passed, 0 failed, 0 skipped 3 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m1.913s  <\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435.<br \/>  \u0424\u0438\u0447\u0438 selenium \u043d\u0435\u0438\u0441\u0447\u0438\u0441\u043b\u0438\u043c\u044b, \u0434\u0430 \u0438 behave \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0443\u043c\u0435\u0435\u0442. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043e\u0442\u0447\u0435\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 jenkis.<br \/>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445!<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432<\/h3>\n<p>  \u0421\u0435\u043b\u0435\u043d\u0438\u0443\u043c: <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/152653\/\">habrahabr.ru\/post\/152653<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/248559\/\">habrahabr.ru\/post\/248559<\/a><br \/>  <a href=\"http:\/\/www.seleniumhq.org\/docs\/\">www.seleniumhq.org\/docs<\/a><br \/>  <a href=\"http:\/\/selenium2.ru\/docs.html\">selenium2.ru\/docs.html<\/a><br \/>  <a href=\"http:\/\/selenium-python.readthedocs.org\/index.html\">selenium-python.readthedocs.org\/index.html<\/a><br \/>  <a href=\"http:\/\/selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html\">selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html<\/a><\/p>\n<p>  Behave: <br \/>  <a href=\"http:\/\/pythonhosted.org\/behave\/\">pythonhosted.org\/behave<\/a><\/p>\n<p>  Python:<br \/>  <a href=\"https:\/\/pypi.python.org\">pypi.python.org<\/a><br \/>  <a href=\"https:\/\/python.org\">python.org<\/a>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/262929\/\"> http:\/\/habrahabr.ru\/post\/262929\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<cut\/><br \/>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! <br \/>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u0441\u044f \u043d\u0430\u0448\u0438\u043c \u043e\u043f\u044b\u0442\u043e\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c Selenium WebDriver \u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 Behave.<br \/>  \u0415\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0434\u043e\u0431\u0440\u043e \u043f\u043e\u0436\u0430\u043b\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <cut\/>  <\/p>\n<h2>\u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u0447\u0430\u043b\u043e\u043c<\/h2>\n<p>   \u0422\u0443\u0442 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u0438\u0441\u043a\u0430\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u0438 \u043a\u0430\u043a \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 selenium webdriver, \u0430 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0442\u043e\u043b\u044c\u043a\u043e \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u0443\u0434\u043e\u0431\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u0438 \u0433\u043e\u043d\u044f\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 python \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c behave.<\/p>\n<h2>1. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u043d\u0443\u0436\u043d\u043e\u0441\u0442\u0435\u0439<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f python. \u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.python.org\/downloads\/\">\u0442\u0443\u0442<\/a>. \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e 2.7.6, \u0430 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f. \u041a\u0440\u043e\u043c\u0435 python \u043d\u0430\u043c \u0435\u0449\u0435 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f selenium \u0438 \u0441\u0430\u043c behave. <br \/>  \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c selenium \u043c\u043e\u0436\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c <a href=\"https:\/\/pypi.python.org\/pypi\/pip\/7.1.0\">pip<\/a>:<br \/>  <code> pip install selenium <\/code>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 selenium?<\/b><\/p>\n<div class=\"spoiler_text\">\u041a\u0430\u043a \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 wiki:<br \/>  <code> Selenium \u2014 \u044d\u0442\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Web-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. <\/code><br \/>  \u0422\u0430\u043a \u0436\u0435 \u043f\u0440\u043e \u043d\u0435\u0433\u043e \u043c\u043d\u043e\u0433\u043e \u043f\u0438\u0441\u0430\u043b\u0438 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435:<br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/152653\/\">\u0442\u0443\u0442<\/a>, <a href=\"http:\/\/habrahabr.ru\/post\/248559\/\">\u0438 \u0442\u0443\u0442 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u044b\u0439 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/p>\n<p>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043f\u0440\u043e Selenium \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c: <br \/>  <a href=\"http:\/\/www.seleniumhq.org\/docs\/\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a><br \/>  <a href=\"http:\/\/selenium2.ru\/docs.html\">\u043f\u0435\u0440\u0435\u0432\u043e\u0434<\/a><br \/>  <a href=\"http:\/\/selenium-python.readthedocs.org\/index.html\">\u043d\u0435 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f selenium with python<\/a><br \/>  <a href=\"http:\/\/selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0434\u043b\u044f selenium with python<\/a>  <\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c behave. \u041c\u043e\u0436\u043d\u043e \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c pip: <br \/>  <code> pip install behave <\/code><br \/>  \u0410 \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0442\u0443\u0442: <a href=\"https:\/\/pypi.python.org\/pypi\/behave\">behave \u043d\u0430 pypi<\/a><br \/>  \u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 behave? Behave \u2014 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u043e\u0440\u043a \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 python-\u0441\u0442\u0438\u043b\u0435(<a href=\"http:\/\/habrahabr.ru\/post\/216923\/\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Behavior-driven development?<\/a>).<br \/>  Behave \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043d\u0430\u0442\u0443\u0440\u0430\u043b\u044c\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0441 \u043b\u043e\u0433\u0438\u043a\u043e\u0439 \u043d\u0430 python. <br \/>  \u041e\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0441\u0435\u0440\u044c\u0435\u0437\u043d\u044b\u043c\u0438 \u043f\u043b\u044e\u0441\u0430\u043c\u0438:<\/p>\n<p>  + \u041b\u0435\u0433\u043a\u0430\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<br \/>  + \u041e\u0442\u0447\u0435\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit<br \/>  + \u0422\u0435\u0441\u0442\u044b \u043c\u043e\u0436\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435.<br \/>  + \u0415\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0441 jenkins (\u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 CI, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435, \u0442\u043e\u0436\u0435)<\/p>\n<p>  <a href=\"http:\/\/pythonhosted.org\/behave\/comparison.html\">\u0421\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 behave \u0441 \u043f\u043e\u0445\u043e\u0436\u0438\u043c\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/a><br \/>  \u041a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432.<\/p>\n<h2>2. \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430<\/h2>\n<p>  \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c: <br \/>  1. \u0424\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .feature \u2014 \u0441\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u044b.<br \/>  2. \u0414\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e steps, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0444\u0430\u0439\u043b\u044b .py \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0448\u0430\u0433\u043e\u0432, \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0442\u0435\u0441\u0442\u044b, \u043d\u0430 python.<\/p>\n<p>  \u041e\u043f\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044e \u043f\u0430\u043f\u043a\u0443 steps \u0444\u0430\u0439\u043b \u2014 environment.py c \u043a\u043e\u0434\u043e\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043f\u0440\u0435\u0436\u0434\u0435 \u0438\u043b\u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432 \u0442\u0435\u0441\u0442\u0435. <br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 <a href=\"http:\/\/pythonhosted.org\/behave\/tutorial.html#environmental-controls\">\u0442\u0443\u0442<\/a>.<br \/>  \u041d\u0430\u0448 \u043f\u0440\u0438\u043c\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u043c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b.<\/p>\n<p>  \u0418\u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0432 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0430\u0446\u0438\u0438: <\/p>\n<p>  features\/ <br \/>  features\/everything.feature<br \/>  features\/steps\/<br \/>  features\/steps\/steps.py<\/p>\n<p>  <a href=\"http:\/\/pythonhosted.org\/behave\/tutorial.html\">\u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0437 behave tutorial<\/a><br \/>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u0435\u0441\u0442!<\/p>\n<h2>3. \u041d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u0435\u0441\u0442\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043f\u0430\u043f\u043a\u0435 steps, \u0444\u0430\u0439\u043b c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .py, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043e\u043f\u0438\u0448\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0430.<br \/>  \u041d\u0430\u0437\u043e\u0432\u0435\u043c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b first_test.py.<br \/>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u0435\u0439\u0441 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0439 \u0444\u043e\u0440\u043c\u044b ya.ru.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u043a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0432 \u0444\u0430\u0439\u043b firs_test.py.  <\/p>\n<pre><code class=\"python\"># -*- coding: utf-8 -*- from behave import * from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC import time  #\u041e\u0442\u043a\u0440\u043e\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u0443\u044e \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443. \u041f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430 \u0430\u0434\u0440\u0435\u0441 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. @given('website &quot;{url}&quot;') def step(context, url): #\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u043a\u0443, \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0442\u0435\u0441\u0442\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435     context.browser = webdriver.Firefox()     context.browser.maximize_window()     context.browser.get(&quot;http:\/\/ya.ru&quot;)  #\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0436\u043c\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 &quot;\u041d\u0430\u0439\u0442\u0438&quot; @then(&quot;push button with text '{text}'&quot;) def step(context, text):     WebDriverWait(context.browser, 120).until(         EC.element_to_be_clickable((By.XPATH, '\/\/button'))     )     context.browser.find_element_by_xpath('\/\/button').click()  #\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u043f\u043e\u0438\u0441\u043a\u0430, \u0435\u0441\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043a\u043e\u043c\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 @then(&quot;page include text '{text}'&quot;) def step(context, text):     WebDriverWait(context.browser, 120).until(         EC.presence_of_element_located((By.XPATH, '\/\/*[contains(text(), &quot;%s&quot;)]' % text))     )     assert context.browser.find_element_by_xpath('\/\/*[contains(text(), &quot;%s&quot;)]' % text)     context.browser.quit() <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u043b\u0435\u043d\u044c \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043a\u043e\u0434, \u0442\u043e \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0430\u043a\u0430\u044f:<br \/>  1. \u041e\u0442\u043a\u0440\u044b\u0442\u044c ya.ru<br \/>  2. \u041a\u043b\u0430\u0446\u043d\u0443\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00ab\u041d\u0430\u0439\u0442\u0438\u00bb<br \/>  3. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432\u044b\u0434\u0430\u0447\u0438 \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0441\u0442: \u00ab\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u00bb<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043a\u043e\u0433\u0434\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043b\u043e\u0433\u0438\u043a\u0430 \u0442\u0435\u0441\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c \u0442\u0435\u0441\u0442.<br \/>  \u0412 \u043f\u0430\u043f\u043a\u0435 \u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0435\u0439 steps \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b .feature, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0448\u0430\u0433\u0438: <\/p>\n<pre><code class=\"html\">#\u0423\u043a\u0430\u0436\u0435\u043c \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430 \u0444\u0438\u0447\u0430 Feature: Checking search #\u0423\u043a\u0430\u0436\u0435\u043c \u0438\u043c\u044f \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f (\u0432 \u043e\u0434\u043d\u043e\u0439 \u0444\u0438\u0447\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e) Scenario: \u0421heck some text in search results #\u0418 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u0448\u0430\u0433\u0438.   Given website &quot;ya.ru&quot;   Then push button with text '\u041d\u0430\u0439\u0442\u0438'   Then page include text '\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441' <\/code><\/pre>\n<p>  \u0428\u0430\u0433\u0438 \u0438\u0437 \u0442\u0435\u0441\u0442\u0430, \u043f\u043e \u0434\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u0430\u043c \u0441\u0432\u044f\u0436\u0443\u0442\u0441\u044f \u0441 python \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c\u0438. (\u0414\u0435\u043a\u043e\u0440\u0430\u0442\u043e\u0440\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0437\u043d\u0430\u043a\u043e\u043c @)<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448 \u0442\u0435\u0441\u0442.<br \/>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443, \u0433\u0434\u0435 \u043e\u043d \u043b\u0435\u0436\u0438\u0442, \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:   <\/p>\n<pre><code class=\"html\">behave -i first_test.feature <\/code><\/pre>\n<p>  \u0424\u043b\u0430\u0433 -i \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u0447\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u043f\u043e\u0434 \u043f\u0430\u0442\u0442\u0435\u0440\u043d \u043f\u043e\u0438\u0441\u043a\u0430.<br \/>  \u0415\u0441\u043b\u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c c \u0444\u043b\u0430\u0433\u043e\u043c &#8212;junit \u0442\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043e\u0442\u0447\u0435\u0442 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u0445\u043e\u0440\u043e\u0448\u043e, \u0442\u043e \u043e\u0442\u0447\u0435\u0442 \u0431\u0443\u0434\u0435\u0442, \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e, \u0442\u0430\u043a\u0438\u043c:<\/p>\n<pre><code class=\"html\"> Feature: Checking search # first_test.feature:1    Scenario: Send some text in search box and check some text in search results  # ya.feature:2     Given website &quot;ya.ru&quot;                                                       # steps\/test.py:9 0.662s     Then push button with text '\u041d\u0430\u0439\u0442\u0438'                                          # steps\/test.py:14 0.242s     Then page include text '\u0417\u0430\u0434\u0430\u043d \u043f\u0443\u0441\u0442\u043e\u0439 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441'                      # steps\/test.py:22 1.009s  1 feature passed, 0 failed, 0 skipped 1 scenario passed, 0 failed, 0 skipped 3 steps passed, 0 failed, 0 skipped, 0 undefined Took 0m1.913s  <\/code><\/pre>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u0440\u0438\u0432\u0435\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435.<br \/>  \u0424\u0438\u0447\u0438 selenium \u043d\u0435\u0438\u0441\u0447\u0438\u0441\u043b\u0438\u043c\u044b, \u0434\u0430 \u0438 behave \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0443\u043c\u0435\u0435\u0442. \u0412 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435, \u043e\u0442\u0447\u0435\u0442\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 junit \u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e \u0441 jenkis.<br \/>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445!<\/p>\n<h3>\u0421\u043f\u0438\u0441\u043e\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432<\/h3>\n<p>  \u0421\u0435\u043b\u0435\u043d\u0438\u0443\u043c: <br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/152653\/\">habrahabr.ru\/post\/152653<\/a><br \/>  <a href=\"http:\/\/habrahabr.ru\/post\/248559\/\">habrahabr.ru\/post\/248559<\/a><br \/>  <a href=\"http:\/\/www.seleniumhq.org\/docs\/\">www.seleniumhq.org\/docs<\/a><br \/>  <a href=\"http:\/\/selenium2.ru\/docs.html\">selenium2.ru\/docs.html<\/a><br \/>  <a href=\"http:\/\/selenium-python.readthedocs.org\/index.html\">selenium-python.readthedocs.org\/index.html<\/a><br \/>  <a href=\"http:\/\/selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html\">selenium.googlecode.com\/svn\/trunk\/docs\/api\/py\/index.html<\/a><\/p>\n<p>  Behave: <br \/>  <a href=\"http:\/\/pythonhosted.org\/behave\/\">pythonhosted.org\/behave<\/a><\/p>\n<p>  Python:<br \/>  <a href=\"https:\/\/pypi.python.org\">pypi.python.org<\/a><br \/>  <a href=\"https:\/\/python.org\">python.org<\/a>     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/262929\/\"> http:\/\/habrahabr.ru\/post\/262929\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-261762","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=261762"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/261762\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=261762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=261762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=261762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}