Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

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 Today at 1:03 pm


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