Problems with synchronization with the protractor. sometimes due to network issues or performance issues due to problems with my draws. I decided to solve the existing problems with browser.sleep (). Later I found out about browser.wait ().
What is the difference between the two, and which is better for solving network or performance issues.
When it comes to solving the synchronization problem, it is tempting and easy to set up a βfastβ browser.sleep () and move on.
, - . / , - , , , - - , , .. , , , .
browser.wait(), -. Protractor/WebDriverJS , true. , .
, ( ).
: http://www.protractortest.org/#/api?view=webdriver.WebDriver.prototype.sleep
browser.sleep()
, .
browser.wait()
.
This function blocks the WebDriver control flow, not javascript runtime. This only delays the execution of future webdriver commands (for example, it will make Protractor wait before sending future commands to the selenium server) and only when the webdriver control flow is enabled.
Documentation link http://www.protractortest.org/#/api
Source: https://habr.com/ru/post/1683316/More articles:Combine array objects in PHP with Eloquent - arraysVisual Studio Code User Defined Argument - visual-studio-codeSpot the difference between updating and reloading - javascriptwhy is << 256 :: size (16) >> present as << 1, 0 >>? - erlangComplex filter and order Django - sqlExpected transporter condition for an element containing any text - angularjsKeep Keras breakpoints in Google Cloud Bucket - tensorflowRider Xamarin error MSB1008: You can specify only one project - androidJinja2 filters for airflow Airflow - pythonCall the function now and every 1 minute in a full minute? - javascriptAll Articles