Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

To select an element inside a folder in a Tree structure UI uisng selenium web driver calls

View previous topic View next topic Go down

To select an element inside a folder in a Tree structure UI uisng selenium web driver calls

Post by HemaPen on Mon Jul 22, 2013 6:55 pm

hi,

   We have to do automation for testing our product which is a  web based UI product. It has a tree structure just like windows explorer. 

Folder1
  ->element1
  ->element2

When the software comes up, Folder1 is not always open(double clicked state).
If it is not open I want to double click so it opens. 

How do I check if it is already open? Because if it is already open and I do double click it closes the folder.

secondly: How do i get the element Element1 and right click on it to select one more option?

I tried to get findElements(by.xpath(of Folder1)); which is returning null.
I also tried findElement(by.xpath(of element1)); which is not working. it says un selectable element, as that element unselectable=on.

My requirement is open the Folder1, right click on element1 and select 4th item in the menu.

Any solution will be highly appreciated.


I figured out that contextClick doesnt work with chrome driver, have to wait for Chrome version 30+. 
So now I have switched to firefox driver.  I get the context menu, have about 9 options grouped into
4, 2, 3, 1... I wanto select 6th conext menu option. 

This is what I am trying to select 6th item by sending 6 ARROW_DOWN.

newAction.contextClick(pgmFolder).sendKeys(Keys.chord(Keys.ARROW_DOWN, Keys.ARROW_DOWN,Keys.ARROW_DOWN,Keys.ARROW_DOWN,Keys.ARROW_DOWN,Keys.ARROW_DOWN,Keys.RETURN));


What is happening is irrespective of how many ARROW_DOWN I send it only selects 4th option.

Any clue as to what is happening?

HemaPen

Posts : 7
Join date : 2013-06-20

Back to top Go down

Re: To select an element inside a folder in a Tree structure UI uisng selenium web driver calls

Post by rohit13 on Mon Sep 16, 2013 7:26 pm

is it possible for you to provide website URL?
It would be helpful..You can send me in private mail..

_________________
Radical QA
http://radical-qa.blogspot.in/

rohit13
Master
Master

Posts : 180
Join date : 2012-03-29
Age : 30
Location : INDIA

http://radical-qa.blogspot.in/

Back to top Go down

Re: To select an element inside a folder in a Tree structure UI uisng selenium web driver calls

Post by mail2prassad on Tue Sep 17, 2013 8:06 pm

Mostly the tree structures are built using client side libraries like JQuery or by ajax calls, also it varies with the implementation. the elements may be present with null values or the elements may be dynamically generated (DHTML).

Here findElements(by.xpath(of Folder1)); returns null, this may be because you are trying to look at the elements even if the folder structure is closed. you can only query this only if the the folder is open. Add a check to see if the folder is open. 


Regarding the 4th option selection, it is not clear how the elements are grouped. It looks like the control is not going to the next group. the first group contains 4 elements, second group contains two elements, so to select the 6th element, you need to go to second group and click on the last element. It looks like the control is ending up in first group and clicking on the last element (4th element) because there is no 6th element. Try selecting 2nd or 3rd element, it should work fine.
You may need to modify your code so that the control goes to the next group to select the required option.


Best,
Prassad

mail2prassad
Amateur
Amateur

Posts : 41
Join date : 2013-06-05

Back to top Go down

Re: To select an element inside a folder in a Tree structure UI uisng selenium web driver calls

Post by Sponsored content Today at 3:22 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum