selenium - image button

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

selenium - image button

suresh
Selenium is not able to click on the button image.
i used xpath (normal, and absolute) in both ways. but it is not able to click the button(image).
Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

softwaretestingforum
Administrator
Hi Suresh,

Thanks for posting you question herein. This group is very new and needs more users like you to make it successful.

Regarding click issue, can you post html of image which you are trying to click?
Or better if there is any way for me to access the application.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

suresh
absolute xpath : html/body/div[2]/div/div/div/div[2]/div/div/div/div[5]/div/div[2]/div/div[3]/div/div[2]/div/table/tbody/tr/td

normal xpath : .//*[@id='isc_1T']/table/tbody/tr/td

DOM (HTML) : <div id="isc_1T" style="position: relative; visibility: inherit; z-index: 200522; cursor: pointer;" eventproxy="isc_Label_8">
</div>

Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

softwaretestingforum
Administrator
I assume that you don't encounter any error with click operation, but click also does not take place.
Could you try -

selenium.highlight("elementLocator");
selenium.click("elementLocator")

and let me know what you see.
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

suresh
yes. you are correct . i did not encounter any error message when used click keyword.
but when i used clickAndWait , it is waiting for some and throwing  timeout error message. other than this no separate error message is shown.
BTW, how to use the below commands in IDE.

selenium.highlight("elementLocator");
selenium.click("elementLocator")

Thanks,
Suresh
Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

suresh
Reply | Threaded
Open this post in threaded view
|

Re: selenium - image button

softwaretestingforum
Administrator
You should use waitForPageToLoad only when an operation causes page to be loaded.
Does you click operation reload the page?

You can add a step before click operation in Selenium IDE,
Right click on command window and select Insert New Command.


Insert New Command

Now you can select "highlight" from command drop down and in target box specify the element locator (same element locator which you are using to click on the image)

~ seleniumtests.com