Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
dlh2002
Posts : 3
Join date : 2010-10-10

Can not check the checkbox on popup window   Empty Can not check the checkbox on popup window

Mon Oct 11, 2010 8:13 am
Dear All

I am using selenium with java. On the click on the hyperlink, a pop
window is displayed. I can click on the close button. But fail to
click the check box. the test case is:
selenium.click("link=Business Unit(s)");
selenium.waitForPopUp("test", "30000");
selenium.selectWindow("test"]);
selenium.click("xpath=(//INPUT[@type='checkbox'])[1]");
selenium.click("/FORM/DIV/SPAN/DIV[contains(text(),'CPI Asia')]/INPUT/
@type='checkbox'");
The result is:
16:31:31.531 INFO - Command request: click[xpath=(//
INPUT[@type='checkbox'])[1], ] on session
a5913960ad8544fa8221cd2667c3e3ff
16:31:33.015 INFO - Got result: OK on session
a5913960ad8544fa8221cd2667c3e3ff
16:31:33.015 INFO - Command request: click[/FORM/DIV/SPAN/
DIV[contains(text(),'CPI Asia')]/INPUT/@type='checkbox', ] on session
a5913960ad8544fa8221cd2667c3e3ff
16:31:34.093 INFO - Got result: ERROR: Element /FORM/DIV/SPAN/
DIV[contains(text(),'CPI Asia')]/INPUT/@type='checkbox' not found on
session a5913960ad8544fa8221cd2667c3e3ff
]]
The html source is(i got it using IE developer tool:
action="MultiTreeviewBottomFrame.aspx?
Sentinel=Sentinel&MaintainSpec=true&selectionType=checkBox&SelectedValuesScriptMethod=selectedBUValues&scriptMethod=SelectBUs&dataSource=Class
%3aXeno.Web.UI.DataSources.TaxonomyXNodeTreeViewDataSource
%2cXenoWebControls
%24GSMBusinessUnit&selectLeafOnly=False&rootNodesNotSelectable=false&selectionRequired=False&showHoverText=False"
method="post">
id="droot">
id="21079a4ec66b-4024-4d4c-9dd7-1a3be69bffcc" style="TEXT-DECORATION:
underline">name="hidden21079a4ec66b-4024-4d4c-9dd7-1a3be69bffcc" value="CPI
Africa" />value="21079a4ec66b-4024-4d4c-9dd7-1a3be69bffcc" />CPI Africa
SPAN>


Actually no checkbox was cliecked in UI side. Does anybody know how to resolve
it.

Thanks
Eric
avatar
dlh2002
Posts : 3
Join date : 2010-10-10

Can not check the checkbox on popup window   Empty Re: Can not check the checkbox on popup window

Mon Oct 11, 2010 12:57 pm
selenium return 'OK', but the checkbox in UI actually did not be checked. does anyone know what happened?
avatar
Priyanka
Regular Participant
Regular Participant
Posts : 27
Join date : 2010-10-04

Can not check the checkbox on popup window   Empty Try with selenium.check command

Mon Oct 11, 2010 1:39 pm
Hi,

Can u please try it with
selenium.check("id of checkBox"); instead of selenium.click("id of checkBox");

Please let me know the result...
avatar
dlh2002
Posts : 3
Join date : 2010-10-10

Can not check the checkbox on popup window   Empty Re: Can not check the checkbox on popup window

Mon Oct 11, 2010 2:20 pm
Thanks Priyanka
I changed to
selenium.check("xpath=(//INPUT[@type='checkbox'])[1]");
selenium.ischeck("xpath=(//INPUT[@type='checkbox'])[1]");

selenium return 'OK' and 'true', but UI actually did not get checked.
Sponsored content

Can not check the checkbox on popup window   Empty Re: Can not check the checkbox on popup window

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