1

I have a page using Selenium IDE and RC. This is a results page, and has a bunch of results with checkboxes in front. On top of the page, there are options to Select All, and Clear All. After clicking on the Select All, I get a javascript alert saying "Are you sure you want to select all....?". The HTML/CSS for this is something like:

1) Select All

2) Clear All

When I right-click on Select All and Clear All, and do Inspect Element, the xpath is:

1) /html/body/form/div[2]/div[3]/div[2]/div/span/span

2) /html/body/form/div[2]/div[3]/div[2]/div/span/span[2]

selenium.Click("xpath=(/html/body/form/div[2]/div[3]/div[2]/div/span/span)");

is giving me Error: Element xpath=(/html/body/form/div[2]/div[3]/div[2]/div/span/span not found

selenium.Click("//span[@onclick=\"fnCheckGroupWithMessage(''Are you sure you want to select all?', 'cbxRepeater_');\"]");

is giving me Error: Permission denied

I am not sure why selenium.Click is failing for Select All.

1 Answer 1

2

Instead of

selenium.Click("xpath=(/html/body/form/div[2]/div[3]/div[2]/div/span/span)");

try

selenium.Click("xpath=/html/body/form/div[2]/div[3]/div[2]/div/span/span");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.