For the debug purpose you can put appropriate waits and see whether the UI
elements are really visible or not.

Following firefox plugin [1] will help you to select alternative wedDriver
elements.

[1]
https://addons.mozilla.org/en-US/firefox/addon/element-locator-for-webdriv/

Thanks,
Krishantha.

On Mon, Nov 3, 2014 at 10:12 AM, Dhanuka Ranasinghe <[email protected]>
wrote:

> Hi,
>
> Pleasse use below library which help to get rid of element finding issue.
>
>
> http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/ui/FluentWait.html
>
> maven:
>
>                 <dependency>
>                       <groupId>org.seleniumhq.selenium</groupId>
>                       <artifactId>selenium-java</artifactId>
>                       <version>2.31.0</version>
>               </dependency>
>
>
> cheers,
>
> Dhanuka
>
>
> *Dhanuka Ranasinghe*
>
> Senior Software Engineer
> WSO2 Inc. ; http://wso2.com
> lean . enterprise . middleware
>
> phone : +94 715381915
>
> On Sun, Nov 2, 2014 at 11:13 PM, Ayesha Dissanayaka <[email protected]>
> wrote:
>
>> Hi Awanthika,
>>
>> One possible reason is that Selenium WebDriver executes so fast that UI
>> elements may have not been loaded properly at the time driver looks for the
>> element. You can execute UI tests in debug mode and see whether the reason
>> is above or elements that driver is looking for are available in the UI
>>
>> Thanks!
>> - Ayesha
>>
>> On Mon, Nov 3, 2014 at 8:17 AM, Awanthika Senarath <[email protected]>
>> wrote:
>>
>>> Hi,
>>>
>>> In doing subject I have faced the following issue,
>>>
>>> In writing tests for WSO2 developer Studio based on Codenvy
>>>
>>> 1. Some of the UI elements we need to test are not having debugIDs, and
>>> we are unable to integrate debug IDs in the source
>>> 2. Hence I am trying to retrieve them using the xpath parameter such as
>>>         //div[contains(.,'JAX RS Project')]
>>> 3. This works succesfully for some UI elements and fails in some.
>>>
>>> I examined the UI, whether it contained more than one web driver
>>> elements with the same xpath,  but could not find any. Is there any other
>>> reason why this could happen?
>>>
>>> thanks and regards
>>>
>>> --
>>> Awanthika Senarath
>>> Software Engineer, WSO2 Inc.
>>> Mobile: +94717681791
>>>
>>>
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> *Ayesha Dissanayaka*
>> Software Engineer,
>> WSO2, Inc : http://wso2.com
>> <http://www.google.com/url?q=http%3A%2F%2Fwso2.com&sa=D&sntz=1&usg=AFQjCNEZvyc0uMD1HhBaEGCBxs6e9fBObg>
>> 20, Palmgrove Avenue, Colombo 3
>> E-Mail: [email protected] <[email protected]>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Krishantha Samaraweera
Senior Technical Lead - Test Automation
Mobile: +94 77 7759918
WSO2, Inc.; http://wso2.com/
lean . enterprise . middlewear.
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to