<!-- 
RSS generated by JIRA (9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b) at Mon Feb 12 00:06:11 CET 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Magnolia - Issue tracker</title>
    <link>https://jira.magnolia-cms.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-uk</language>    <build-info>
        <version>9.4.2</version>
        <build-number>940002</build-number>
        <build-date>19-01-2023</build-date>
    </build-info>


<item>
            <title>[MGNLCE-89] Fix incorrect usage of Selenium implicitly wait timeout to deal with dynamic ui behavior</title>
                <link>https://jira.magnolia-cms.com/browse/MGNLCE-89</link>
                <project id="13380" key="MGNLCE">Community Edition</project>
                    <description>&lt;p&gt;We set the implicitlyWait timeout of selenium to a high number: 10 seconds compared to the default of 0.&lt;br/&gt;
The implicitlyWait timeout is the timeout the remote driver will poll the DOM to decide if an element is there or not. This implicit timeout should not be mixed with the explicit timeout like the waitUntils. They have an unfortunate influence on each other and should not be used both at the same time because:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;They operate on different levels: implicit timeout is implemented on the specific driver where as the explicit timeouts are implemented on the tests&lt;/li&gt;
	&lt;li&gt;They influence each other because inside a waitUntil (explicit timeout) you will use the driver (implicit timeout) which can lead for example to a total timeout which is longer than both timeouts&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;In a little bit more detail:&lt;br/&gt;
We use the waitUntil as a polling mechanism, executed every 0.5 sec, to repeatedly evaluate if a condition becomes true or not. In the end its like an assert with function and timeout of 10 sec.&lt;br/&gt;
Inside that condition we use the driver to find elements in the DOM which in turn will poll the DOM until the element can be found or the implicit wait timeout of 10 sec is reached.&lt;/p&gt;

&lt;p&gt;So we have two polling loops inside each other operating with the same timeouts which renders one of them useless. If we look at the functionality on each and how they are intended to be used it becomes clear we want to use the functionality of conditions and waitUntils and therefore the implicit wait has to be reduced.&lt;/p&gt;

&lt;h4&gt;&lt;a name=&quot;Example&quot;&gt;&lt;/a&gt;Example&lt;/h4&gt;
&lt;p&gt;Just as an example where this caused a concrete issue: &lt;tt&gt;AbstractMagnoliaUITest#getTabWithCaption&lt;/tt&gt;.&lt;br/&gt;
We have the situation with tabs in dialogs that the dialog is dynamically loaded and, depending on the space, tabs can appear directly on the top or hidden in the context menu. So we have to wait for a condition to be met because we don&apos;t know how long it will take until the dialog is open and ready. The condition is met if either the tab is visible or in the menu. So one of the conditions has to be met where as the other one most certainly will not.&lt;br/&gt;
If the dialog is loaded immediately we have no issue but if its a little bit slower the following things happen:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Enter the or condition for either hidden or visible tab&lt;/li&gt;
	&lt;li&gt;Evaluate the first condition: try to find the tab in the visible top for max 10sec&lt;/li&gt;
	&lt;li&gt;Tab is dynamically added to the DOM top bar&lt;/li&gt;
	&lt;li&gt;First condition evaluates to false and returns because the element could be found but its not visible yet (visibility is not an attribute of the DOM element but a result of the rendering of the DOM)&lt;/li&gt;
	&lt;li&gt;Evaluate the second condition: try to find the tab hidden in the menu&lt;/li&gt;
	&lt;li&gt;Tab is rendered and becomes visible&lt;/li&gt;
	&lt;li&gt;Second condition evaluates to false because the find element in the condition times out after 10 sec because the element could not be found (and will never be found as the tab was added to the top)&lt;/li&gt;
	&lt;li&gt;The or condition would now try to evaluate the two conditions over and over again but because we are already past 10 sec (needless implicitly waiting for the hidden tab) the whole condition times out now as well after &amp;gt;10sec.&lt;/li&gt;
&lt;/ol&gt;


&lt;h4&gt;&lt;a name=&quot;FurtherReading%3A&quot;&gt;&lt;/a&gt;Further Reading:&lt;/h4&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;http://elementalselenium.com/tips/47-waiting&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://elementalselenium.com/tips/47-waiting&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;https://stackoverflow.com/questions/15164742/combining-implicit-wait-and-explicit-wait-together-results-in-unexpected-wait-ti#answer-15174978&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://stackoverflow.com/questions/15164742/combining-implicit-wait-and-explicit-wait-together-results-in-unexpected-wait-ti#answer-15174978&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
                <environment></environment>
        <key id="60673">MGNLCE-89</key>
            <summary>Fix incorrect usage of Selenium implicitly wait timeout to deal with dynamic ui behavior</summary>
                <type id="5" iconUrl="https://jira.magnolia-cms.com/secure/viewavatar?size=xsmall&amp;avatarId=10896&amp;avatarType=issuetype">Sub-task</type>
                            <parent id="60305">MGNLCE-86</parent>
                                    <priority id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/priorities/neutral.gif">Neutral</priority>
                        <status id="6" iconUrl="https://jira.magnolia-cms.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="mmuehlebach">Michael M&#252;hlebach</assignee>
                                    <reporter username="mmuehlebach">Michael M&#252;hlebach</reporter>
                        <labels>
                    </labels>
                <created>Fri, 4 Aug 2017 18:30:10 +0200</created>
                <updated>Thu, 7 Sep 2017 11:09:27 +0200</updated>
                            <resolved>Mon, 4 Sep 2017 15:37:56 +0200</resolved>
                                                    <fixVersion>5.5.7</fixVersion>
                    <fixVersion>5.6</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                        <attachments>
                            <attachment id="40247" name="ui-tests_implicit-explicit.png" size="54172" author="mmuehlebach" created="Fri, 4 Aug 2017 18:31:06 +0200"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10111" key="com.atlassian.jira.toolkit:reporterdomain">
                        <customfieldname>Company</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>magnolia-cms.com</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_12730" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_14151" key="com.atlassian.jira.toolkit:message">
                        <customfieldname>Docu info</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10061" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comm is not jira-dev</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10071" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last participant</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ajones</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_13136" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            6 years, 28 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10020" key="com.atlassian.jira.toolkit:attachments">
                        <customfieldname>Number of attachments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10150" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname>Number of comments</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>mmuehlebach</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10833" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0777f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10244" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10245" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="530">Basel 106</customfieldvalue>
    <customfieldvalue id="534">Basel 107</customfieldvalue>
    <customfieldvalue id="536">Basel 108</customfieldvalue>
    <customfieldvalue id="545">Basel 109</customfieldvalue>
    <customfieldvalue id="547">Basel 110</customfieldvalue>
    <customfieldvalue id="554">Basel 111</customfieldvalue>
    <customfieldvalue id="559">Basel 112</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14145" key="com.intenso.jira.issue-templates:issue-templates-customfield">
                        <customfieldname>Template</customfieldname>
                        <customfieldvalues>
                            


                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_15131" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Time in Discovery</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time in Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>