Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

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?
avatar
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
avatar
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')]
avatar
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
avatar
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