- QASelenium
- Posts : 2
Join date : 2011-11-30
Selecting item from a drop down richfaces control type
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!
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!
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: Selecting item from a drop down richfaces control type
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.
You can use Firebug plugin in Firefox to copy the code.
- QASelenium
- Posts : 2
Join date : 2011-11-30
Re: Selecting item from a drop down richfaces control type
Mon Dec 05, 2011 11:31 pm
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.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.
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");
- lalkotaActive particpant
- Posts : 21
Join date : 2011-06-02
Re: Selecting item from a drop down richfaces control type
Tue Dec 06, 2011 5:28 pm
Hello,
Visit this link
http://online-selenium-trainings.webs.com
http://seleniumtraining.in
http://seleniumtraining.blogspot.com/
Visit this link
http://online-selenium-trainings.webs.com
http://seleniumtraining.in
http://seleniumtraining.blogspot.com/
Permissions in this forum:
You cannot reply to topics in this forum
|
|