Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Selecting item from a drop down richfaces control type

View previous topic View next topic Go down

Selecting item from a drop down richfaces control type

Post by QASelenium on Thu Dec 01, 2011 1:01 am

I am new to Selenium. Have been exploring for the last 2 weeks and now stuck with this issue for the past 7 days. I have a drop down list in my UI under test. IDE is not recording the selection. What it records is below
driver.findElement(By.xpath("//div[@id='totalForm:bodyTile:JobDetailsTabView:JobLocationDropDownlist']/span[3]")).click(); OR in other words
Command : click
target : //div[@id='totalForm:bodyTile:JobDetailsTabView:JobLocationDropDownlist']/span[3]

I did my findings and tried combination of command like type,typekeys and fireevent.

Stumbled on this forum, registered today and now posting, with hope of getting this resolved and make this forum my bible. Just like qaforums.

Thanks!

QASelenium

Posts : 2
Join date : 2011-11-30

Back to top Go down

Re: Selecting item from a drop down richfaces control type

Post by faramka on Mon Dec 05, 2011 4:57 pm

Could you please paste some code which is responsible for showing drop down list?
You can use Firebug plugin in Firefox to copy the code.

faramka
Professional
Professional

Posts : 143
Join date : 2011-09-15
Location : Poland

Back to top Go down

Re: Selecting item from a drop down richfaces control type

Post by QASelenium on Mon Dec 05, 2011 11:31 pm

faramka wrote:Could you please paste some code which is responsible for showing drop down list?
You can use Firebug plugin in Firefox to copy the code.
Exactly that is what I used to get insight of the objects info. BTW finally I was able to get thru this and below is the line of code after I exported IDE script to webdriver.
selenium.type("id=totalForm:bodyTile:JobDetailsTabView:WorkingTitleDropDowncomboboxField", "AQA");
selenium.click("id=totalForm:bodyTile:JobDetailsTabView:WorkingTitleDropDowncomboboxButton");
selenium.typeKeys("id=totalForm:bodyTile:JobDetailsTabView:WorkingTitleDropDowncomboboxField", "A");
selenium.fireEvent("id=totalForm:bodyTile:JobDetailsTabView:WorkingTitleDropDowncomboboxField", "keypress");
selenium.type("id=totalForm:bodyTile:JobDetailsTabView:customField_123512DropDowncomboboxField", "IT Serv Delivery HR & Finance");
selenium.click("id=totalForm:bodyTile:JobDetailsTabView:customField_123512DropDowncomboboxButton");
selenium.typeKeys("id=totalForm:bodyTile:JobDetailsTabView:customField_123512DropDowncomboboxField", "I");
selenium.fireEvent("id=totalForm:bodyTile:JobDetailsTabView:customField_123512DropDowncomboboxField", "keyup");
selenium.type("id=totalForm:bodyTile:JobDetailsTabView:JobLocationDropDowncomboboxField", "Wayne");
selenium.click("id=totalForm:bodyTile:JobDetailsTabView:JobLocationDropDowncomboboxButton");
selenium.typeKeys("id=totalForm:bodyTile:JobDetailsTabView:JobLocationDropDowncomboboxField", "W");
selenium.fireEvent("id=totalForm:bodyTile:JobDetailsTabView:JobLocationDropDowncomboboxField", "keyup");

But now I am having issue, where the click is not working for a link that worked in IDE. In IDE it works and is recorded as clickandwait() and in webdriver it is below line of code, when it fails for click. Any suggestions.
selenium.waitForPageToLoad("30000");
selenium.click("id=menubarTile:menuBarForm:NewJob_linkAnchor");

QASelenium

Posts : 2
Join date : 2011-11-30

Back to top Go down

Re: Selecting item from a drop down richfaces control type

Post by lalkota on Tue Dec 06, 2011 5:28 pm


lalkota
Active particpant
Active particpant

Posts : 21
Join date : 2011-06-02

Back to top Go down

Re: Selecting item from a drop down richfaces control type

Post by Sponsored content


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