XPATH support of parent:: etc

xpath
parent
sibling
child

#1

Hi

Does workfusion support the use of parent::, child::, preceding-sibling::, following-sibling:: etc? I ask because i have a xpath (//div[contains(.,'Rusmiddel')]/parent::span/div[contains(.,'Lukket')]/parent::span/nx-dropdown/div/button) that works in Firepath but not in RPA-E and i can’t figure out why :thinking:

Best regards :slightly_smiling_face:


#2

To answere my own question: It seems to be implemented.


#3

You guys like that ha’ :smile: The stopping element in the xpath-string seems to be:

/nx-dropdown/

This might be related to the AngularJS problem mentioned here: Webelement - Xpath - Get value of input-element made with AngularJS / ng-model?

The “inspect element” code of nx-dropdown is:

<nx-dropdown></nx-dropdown>


#4

There is also a div-element inside the nx-dropdown-element and a button-element inside the div-element, but i can’t reach the elements with XPATH in RPA-E. Everything seems to stop with the nx-dropdown element.


#5

the content of the nx-dropdown can be rendered on run-time, so try to click this element, and only then select a value.


#6

A little more example-code to enjoy:

<nx-dropdown nx-id="treeItemActionsDropdown" ng-if="::(!hideActions)" load-on-toggle="prepareActions()"><!-- ngIf: ::dvm.fullyFunctional --><div class="btn-group dropdown real-dropdown open" uib-dropdown="" on-toggle="dvm.toggle(open)" style="" ng-class="::{'open': !!dvm.openOnFullyFunctional}" is-open="::!!dvm.openOnFullyFunctional" ng-show="::dvm.readyToShow" ng-if="::dvm.fullyFunctional">
	<button nx-id="treeItemActionsDropdown" ng-focus="true" class="btn btn-default dropdown-toggle" type="button" nx-no-click-propagation="" uib-dropdown-toggle="" aria-haspopup="true" aria-expanded="true">
		<span class="caret"></span>
	</button>
	<ul class="dropdown-menu dropdown-menu-responsive" role="menu" ng-transclude=""><li id="dropdown-placeholder" style="display: none;">Ingen funktioner</li><div class="loading-spinner" style="display: none;"></div>
		<!-- ngRepeat: action in ::actions --><nx-dropdown-item ng-repeat="action in ::actions" nx-id="action.name" click="action.perform()"><!-- ngIf: whenFn() --><li nx-id="patient_pathway_openPathway" role="presentation" ng-click="clickFn($event)" ng-if="whenFn()" ng-transclude=""><span>Åben forløb</span></li><!-- end ngIf: whenFn() -->
</nx-dropdown-item><!-- end ngRepeat: action in ::actions --><nx-dropdown-item ng-repeat="action in ::actions" nx-id="action.name" click="action.perform()"><!-- ngIf: whenFn() --><li nx-id="patient_pathway_copyPathway" role="presentation" ng-click="clickFn($event)" ng-if="whenFn()" ng-transclude=""><span>Kopier forløb</span></li><!-- end ngIf: whenFn() -->
</nx-dropdown-item><!-- end ngRepeat: action in ::actions -->
	</ul>
</div><!-- end ngIf: ::dvm.fullyFunctional -->



</nx-dropdown>

#7

Thanks i wil try to experiment with that :slightly_smiling_face:


#8

I think the dropdown is activated when i’m hovering over the element containing the dropdown - not clicking. Thats where Mouse Move - XPATH-support would be nice to have :slightly_smiling_face:


#9

My work-around for missing “Mouse move to XPATH” - use Mouse Click by XPATH and choose right-click instead of left.