Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

assert image present by src with just image name

View previous topic View next topic Go down

assert image present by src with just image name

Post by Archana on Mon Aug 31, 2009 8:34 pm

In one of my pages, I have many sort links. Beside each sort link, I have one image(up/down arrow)

clickandWait | link=ID
assertElementPresent | //table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td[1]/a/img[contains(@src,'http://192.168.0.3/mypicks/themes/default/images/down_arrow.gif')]

clickandWait | link=Date
assertElementPresent | //table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td[2]/a/img[contains(@src,'http://192.168.0.3/mypicks/themes/default/images/down_arrow.gif')]

Somewhere I saw, endswith.

//table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td/a/img[@endswith(@src,'down_arrow.gif')] is not working.

how to get rid of absolute url of image?

Archana
Regular Participant
Regular Participant

Posts : 33
Join date : 2009-08-21

Back to top Go down

Re: assert image present by src with just image name

Post by Adviser on Tue Sep 01, 2009 11:18 am

hi,

try this xpath and let me know

xpath=//table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td/a/img[1]

best of luck.

bye

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: assert image present by src with just image name

Post by Archana on Tue Sep 01, 2009 1:49 pm

Hi, its working fine. But this is not enough to my requirement.

In the same location //table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td/a/img[1], I want to
VerifyEelementPresent some times img1.gif, img2.gif or img3.png.

I need to Verify elements
//table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td/a/img[@endswith(@src,'down_arrow.gif')] , //table[3]/tbody/tr/td[2]/table[2]/tbody/tr/td/a/img[@endswith(@src,'up_arrow.gif')]

Archana
Regular Participant
Regular Participant

Posts : 33
Join date : 2009-08-21

Back to top Go down

Re: assert image present by src with just image name

Post by Adviser on Tue Sep 01, 2009 3:52 pm

hi,

then for this , use store attribute command for verify the name of that link.
you can't do all with same locator because your change dynamically depend upon size or number.

bye

Adviser
------------------------
------------------------

Posts : 379
Join date : 2009-07-30
Location : India

http://seleniumforum.forumotion.net

Back to top Go down

Re: assert image present by src with just image name

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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