Deprecated: Function create_function() is deprecated in /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php on line 258

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372

Warning: Cannot modify header information - headers already sent by (output started at /home/qualit96/public_html/wp-content/plugins/revslider/includes/framework/functions-wordpress.class.php:258) in /home/qualit96/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1372
{"id":14383,"date":"2018-10-16T19:51:51","date_gmt":"2018-10-16T14:51:51","guid":{"rendered":"http:\/\/quality-spectrum.com\/?p=14383"},"modified":"2018-10-16T19:51:51","modified_gmt":"2018-10-16T14:51:51","slug":"object-life-cycle-waits","status":"publish","type":"post","link":"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/","title":{"rendered":"Object life cycle – Waits"},"content":{"rendered":"

The object life cycle and waits<\/p>\n

Firstly, here\u2019s what I call the ‘object life cycle’:<\/p>\n

In UI automation objects we use have a specific pattern that keeps repeating.<\/p>\n

These steps are 1) Wait for object, 2) Find object, 3 Perform action on object \u2013 Repeat.<\/p>\n

I call this the object life cycle, and it is the lifeline for a UI automation framework.<\/p>\n

The first step wait is \u2013 Wait before \u2018finding\u2019 EVERY object.<\/p>\n

Web communication is asynchronous, which means it all depends on the timings of user actions and responses,<\/p>\n

That means, we can never be sure of timings for any interaction.<\/p>\n

Therefore, according to Murphy\u2019s law, \u2018What can go wrong will go wrong\u2019, prepare for the worst.<\/p>\n

In our context, the object we want to work with will NOT be there, so be prepared for it.<\/p>\n

BTW \u2013 Adding a 5 second delay (static delay) is BAD, because it\u2019s always going to be less than needed or more than needed<\/p>\n

Delays have to be dynamic (based on a condition), to wait for the precise time you want them to.<\/p>\n

#QsDaily #automation #framework<\/p>\n<\/div>

<\/div><\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[52],"tags":[],"yoast_head":"\nObject life cycle - Waits - Quality Spectrum<\/title>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Object life cycle - Waits - Quality Spectrum\" \/>\n<meta property=\"og:url\" content=\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/\" \/>\n<meta property=\"og:site_name\" content=\"Quality Spectrum\" \/>\n<meta property=\"article:published_time\" content=\"2018-10-16T14:51:51+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@aali_khalid\" \/>\n<meta name=\"twitter:site\" content=\"@aali_khalid\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"http:\/\/quality-spectrum.com\/#organization\",\"name\":\"Quality Spectrum\",\"url\":\"http:\/\/quality-spectrum.com\/\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/alikhalid\/\",\"https:\/\/www.youtube.com\/c\/QualitySpectrum\",\"https:\/\/twitter.com\/aali_khalid\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/quality-spectrum.com\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/quality-spectrum.com\/wp-content\/uploads\/2019\/11\/QS-logo-mobile-e1574510459832.png\",\"width\":40,\"height\":40,\"caption\":\"Quality Spectrum\"},\"image\":{\"@id\":\"http:\/\/quality-spectrum.com\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/quality-spectrum.com\/#website\",\"url\":\"http:\/\/quality-spectrum.com\/\",\"name\":\"Quality Spectrum\",\"description\":\"Redefining software quality\",\"publisher\":{\"@id\":\"http:\/\/quality-spectrum.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"http:\/\/quality-spectrum.com\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/#webpage\",\"url\":\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/\",\"name\":\"Object life cycle - Waits - Quality Spectrum\",\"isPartOf\":{\"@id\":\"http:\/\/quality-spectrum.com\/#website\"},\"datePublished\":\"2018-10-16T14:51:51+00:00\",\"dateModified\":\"2018-10-16T14:51:51+00:00\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/\"]}]},{\"@type\":\"Article\",\"@id\":\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/#article\",\"isPartOf\":{\"@id\":\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/#webpage\"},\"author\":{\"@id\":\"http:\/\/quality-spectrum.com\/#\/schema\/person\/4805a00d7139e111ea9430e17cc8f28c\"},\"headline\":\"Object life cycle – Waits\",\"datePublished\":\"2018-10-16T14:51:51+00:00\",\"dateModified\":\"2018-10-16T14:51:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/#webpage\"},\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/quality-spectrum.com\/#organization\"},\"articleSection\":\"daily post\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"http:\/\/quality-spectrum.com\/object-life-cycle-waits\/#respond\"]}]},{\"@type\":[\"Person\"],\"@id\":\"http:\/\/quality-spectrum.com\/#\/schema\/person\/4805a00d7139e111ea9430e17cc8f28c\",\"name\":\"Ali Khalid\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"http:\/\/quality-spectrum.com\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/70cbf539f218f275a77959dd2e56bddb?s=96&d=mm&r=g\",\"caption\":\"Ali Khalid\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/posts\/14383"}],"collection":[{"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/comments?post=14383"}],"version-history":[{"count":1,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/posts\/14383\/revisions"}],"predecessor-version":[{"id":14384,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/posts\/14383\/revisions\/14384"}],"wp:attachment":[{"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/media?parent=14383"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/categories?post=14383"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/quality-spectrum.com\/wp-json\/wp\/v2\/tags?post=14383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}