There's been discussion around creating a Watir Angular gem that would 
include the non-HTML compliant elements that Angular uses, but so far no 
one has picked up that mantle.

What error are you getting using these locators?

Without seeing the whole DOM it is difficult to know what is unique.

Investigate what is there by doing:
@browser.elements(class: 'lwc-editIcon').size

if there is more than one, you can specify the one you want with something 
like:
@browser.element(class: 'lwc-editIcon', index: 1)

or for some things this might be the easiest option:
@browser.element(class: 'lwc-editIcon', visible: true)



On Thursday, June 8, 2017 at 11:41:02 AM UTC-7, christina wrote:
>
> I am looking for a shorter xpath
> like
> @browser.element(:css => 
> '.lwc-editIcon.ng-scope.ng-isolate-scope').wait_until_present.flash
> @browser.element(:css => 'lwc-editIcon.ng-scope.ng-isolate-scope').click
>
>
>
> or
>
> @browser.element(:xpath, '//lwc-editIcon').wait_until_present.flash
>
> but these are not working.
>
> And I am not sure if we can access a custom tag like md-icon'
>
> Can we do this?
>
>
> On Thu, Jun 8, 2017 at 12:23 AM, Raja gopalan <[email protected] 
> <javascript:>> wrote:
>
>> b.element(xpath: "placeyourxpathhere").click
>>
>> On Jun 8, 2017 1:45 AM, "c w" <[email protected] <javascript:>> wrote:
>>
>>> Hi,
>>>
>>> I need your help.
>>>
>>> Can one advise me how I can access the element that has the following 
>>> xpath into my angular app.
>>>
>>> /html/body[@class='lwc']/div[@class='lwc-app 
>>> ng-scope']/div[@class='lwc-content ng-scope']/div[@class='lyt-fullHeight 
>>> lyt-appMinWidth ng-scope']/section[@class='lwc-webMarketing lyt-fullHeight 
>>> lwc-hasSubHeader ng-scope']/div[@class='lyt-fullHeight 
>>> ng-scope']/div[@class='lyt-fullHeight']/lwc-scroll-container[@class='lyt-landingPageScroll
>>>  
>>> lwc-contentScroll 
>>> lwc-pageScroll']/div[@class='lwc-ScrollContainer']/div[@class='lwc-scroll']/lwc-layout-container[@class='lwc-webMarketingLayout
>>>  
>>> lwc-landingPageContent ng-scope']/div[@class='lwc-LayoutContainer 
>>> lyt-fullHeight']/div[@class='lwc-centerContainer 
>>> lyt-fullHeight']/section[@class='lwc-contentList lyt-fullHeight 
>>> ng-scope']/lwc-content-list[@class='lyt-fullWidth 
>>> ng-isolate-scope']/section[@class='lwc-ContentList']/lwc-swim-lane[@id='swimLane0']/div[@class='lwc-SwimLane
>>>  
>>> expanded']/div[@class='lwc-contentContainer']/div[@class='lwc-swimLaneItem 
>>> ng-scope']/lwc-swim-lane-tile[@class='ng-isolate-scope']/div[@class='lwc-SwimLaneTile
>>>  
>>> lwc-itemTile ui-draggable-disabled 
>>> ui-draggable-handle']/div[@class='lwc-overlay']/div[@class='lwc-controls']/div[2]/md-icon[@class='lwc-editIcon
>>>  
>>> ng-scope ng-isolate-scope']
>>>
>>>
>>>
>>> Kind regards,
>>> Cristina
>>>
>>> -- 
>>> -- 
>>> Before posting, please read http://watir.com/support. In short: search 
>>> before you ask, be nice.
>>>  
>>> [email protected] <javascript:>
>>> http://groups.google.com/group/watir-general
>>> [email protected] <javascript:>
>>>
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Watir General" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> -- 
>> Before posting, please read http://watir.com/support. In short: search 
>> before you ask, be nice.
>>  
>> [email protected] <javascript:>
>> http://groups.google.com/group/watir-general
>> [email protected] <javascript:>
>>
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to