Hi Rajeenthini,

You don't need to add a explicit wait here, since the extended webdriver we
use in our tests has that wait condition inside findElement method.

We have extended it in that way to prevent the need of adding this kind of
waits when we call driver.findElement

Thanks!
-Ayesha

On Fri, Sep 18, 2015 at 3:40 PM, Rajeenthini Satkunam <[email protected]>
wrote:

> Hi chanaka,
>
> I have tried as you suggest me and as well as I have used by cssSelector.
>
> wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("[href='create-dashboard']")));
> driver.findElement(By.cssSelector("[href='create-dashboard']")).click();
>
> Now it's works fine for me.Thank you for your prompt reply.
>
> On Fri, Sep 18, 2015 at 3:12 PM, Chanaka Jayasena <[email protected]>
> wrote:
>
>> Hi Rajinthini,
>>
>> The element might not be available when you are trying to read it. You
>> can try adding a wait until the element is available.
>>
>> WebDriverWait wait = new WebDriverWait(driver, 60);
>>
>> wait.until(ExpectedConditions.visibilityOfElementLocated(By.linkText(assetName)));
>>
>> thanks,
>> Chanaka
>>
>>
>>
>>
>> On Fri, Sep 18, 2015 at 3:03 PM, Rajeenthini Satkunam <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> I am currently working on a task that writing UI test-cases for user
>>> engagement server using selenium.AFAIK element on User Interface can
>>> identified by several ways using selenium web driver.I have referred
>>> link[1] below.
>>>
>>> [1] -
>>> http://www.softwaretestinghelp.com/using-selenium-xpath-and-other-locators-selenium-tutorial-5/
>>>
>>>
>>> I have tried to write a test-case for Adding new Dashboard for UES. Here
>>> the selenium web driver cannot find the element 'Create Dashboard' on a
>>> interface.
>>> this is code segment I have written to find the 'create dashboard'
>>> element
>>>
>>> driver.findElement(By.linkText("Create Dashboard")).click();
>>>
>>> I have added the screen shot of failed test-case below.
>>>
>>>
>>>
>>> Thus currently the UES elements does not have id attribute,I tried to
>>> identify the element by linkText().And there is a drawback of identifying
>>> the element by linkText() that is empty spaces included inside the words
>>> will be the cause for test failure,IMHO it will be easy to identify the
>>> elements by using id of it.
>>>
>>> And I have faced similar issue when I tried to fix the UI test-cases of
>>> Enterprise Store.As I remember now we are identifying those elements by
>>> id[2].
>>> [2] -
>>> https://github.com/wso2/product-es/blob/master/modules/integration/tests-ui-integration/tests-ui/src/test/java/org/wso2/es/ui/integration/test/publisher/ESPublisherAddEditAssetTestCase.java#L97
>>> In my point of view it is more unique when we identify the element by
>>> it's id.WDYT? And suggest any ways to overcome this issue.
>>> --
>>>
>>> *Thank You.*
>>>
>>> *Rajeenthini Satkunam*
>>>
>>> *Associate Software Engineer | WSO2*
>>>
>>>
>>> *E:[email protected] <[email protected]>*
>>>
>>> *M :+94770832823 <%2B94770832823>   *
>>>
>>>
>>
>>
>> --
>> Chanaka Jayasena
>> Senior Software Engineer; WSO2, Inc.;  http://wso2.com/
>> email: [email protected]; cell: +94 77 785 5565
>> blog: http://chanaka3d.blogspot.com
>>
>
>
>
> --
>
> *Thank You.*
>
> *Rajeenthini Satkunam*
>
> *Associate Software Engineer | WSO2*
>
>
> *E:[email protected] <[email protected]>*
>
> *M :+94770832823 <%2B94770832823>   *
>
>


-- 
*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

Reply via email to