check uncheck box via python in selenium binding

489 views
Skip to first unread message

Deepak Jangid

unread,
Apr 23, 2012, 1:39:29 AM4/23/12
to webd...@googlegroups.com
Hello,

I have a page where i need to check the box which has a fox and before clicking next i need to select that checkbox to make myself agree for that page. I tried to search for element id, but couldn't find.

Python 2.7
Selenium Webdriver 2.20


Regards
Deepak

Mike Riley

unread,
Apr 23, 2012, 11:25:58 AM4/23/12
to webd...@googlegroups.com
Thanks for letting us know that, but if you want us to help you will have to supply a sample of the HTML code that shows how this checkbox is defined, as well as the code you were trying to use to find it.

Mike

Deepak Jangid

unread,
Apr 23, 2012, 11:48:28 AM4/23/12
to webd...@googlegroups.com
This is my code and check box is not have any html id, so i cannot find the element by "element_ID"

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/rtYiChppewUJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Install.py

Mike Riley

unread,
Apr 23, 2012, 12:34:57 PM4/23/12
to webd...@googlegroups.com
There are many ways to locate something with Selenium other than by ID.  I have very few elements in my tests where I can use an ID.

So please copy the section of HTML (or if it is public the URL) and point out which element you are trying to address.

We also would need to know where in your 145 lines of code you are trying to address it.  Not that I know Python that well, but I am sure others here do.

Mike
To unsubscribe from this group, send email to webdriver+unsubscribe@googlegroups.com.

Deepak Jangid

unread,
Apr 24, 2012, 12:56:49 AM4/24/12
to webd...@googlegroups.com
here is the source of page and screen shot of page where we have checkbox.

please guide.

To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/t1rXpfkEL-4J.

To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
source of page.txt

Deepak Jangid

unread,
Apr 24, 2012, 2:06:09 AM4/24/12
to webd...@googlegroups.com
This is the checkbox which i need to select.
untitled.bmp

Mike Riley

unread,
Apr 24, 2012, 12:49:48 PM4/24/12
to webd...@googlegroups.com
I see nothing on that page that produces the text for that checkbox.  So either it is generated by JavaScript (or some other language) on the fly, or that is not the right HTML.  I am guessing you provided the raw HTML source here.  Try getting a snapshot of the actual rendered HTML from the browser itself using the View Source from within the browser.

Just the section that shows the area around the checkbox element should be enough.

Mike

Deepak Jangid

unread,
Apr 26, 2012, 4:21:31 AM4/26/12
to webd...@googlegroups.com
Thank you all. I have resolved this issue and found the the id for checkbox.

To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/rk3XywcpA_0J.

To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages