Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

New to Selenium

View previous topic View next topic Go down

New to Selenium

Post by guzr1 on Wed Mar 20, 2013 1:10 am

Hello,

I'm using IDE to record test cases and I'm getting error on some of them when I play them back.

My test scenario is to delete an item. When it gets to the delete button, it performs a click | link=delete |. I get [error] Element link=delete not found.

Does anyone have any ideas on what I can do to get this to pass?

Thanks,

guzr1

Posts : 5
Join date : 2013-03-20

Back to top Go down

Re: New to Selenium

Post by ccox on Wed Mar 20, 2013 1:40 am

Just from your error, the delete link is not being found, so I have to ask is the delete link actually present when attempting to click on it?

Does it work if you slow the script down? How about if you execute only that command?

This is a very vague description, so please give more info

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: New to Selenium

Post by guzr1 on Wed Mar 20, 2013 2:07 am

It does not work when I slow down the script and, it also fails when I execute only the command. I'm not sure if this helps, but here is the log when I run the script on the app I'm testing, up to the point to were it fails.


  • [info] Executing: |open | /login | |
  • [info] Executing: |assertTitle | NetoCloud :: Login | |
  • [info] Executing: |type | id=username | |
  • [info] Executing: |type | id=password | |
  • [info] Executing: |clickAndWait | name=commit | |
  • [info] Executing: |assertTitle | NetoCloud :: Products - Index | |
  • [info] Executing: |click | xpath=(//a[contains(text(),'Details')])[11] | |
  • [info] Executing: |click | link=delete | |
  • [error] Element link=delete not found

guzr1

Posts : 5
Join date : 2013-03-20

Back to top Go down

Re: New to Selenium

Post by ccox on Wed Mar 20, 2013 2:13 am

Looking at the log, the delete link is not there.

Can you try this:

storeElementPresent | link=delete | deleteLink
echo | ${deleteLink}


ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: New to Selenium

Post by ccox on Wed Mar 20, 2013 2:23 am

If the result of the echo commands returns 'true', it is recognizing the link on the page. If it returns 'false' the element is not there. I suspect it will return false.


FYI I can use the chat on the home page to walk you through it

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: New to Selenium

Post by guzr1 on Wed Mar 20, 2013 4:42 am

I was able to get it working. Thanks for your help.

guzr1

Posts : 5
Join date : 2013-03-20

Back to top Go down

SELENIUM IDE

Post by Rifaz Ahamed on Wed Mar 20, 2013 1:08 pm

How to split the testcases from testsuite on selenium IDE, if we record the whole application and saved as Test suite?

Rifaz Ahamed

Posts : 1
Join date : 2013-03-20

Back to top Go down

Re: New to Selenium

Post by ccox on Wed Mar 20, 2013 9:45 pm

Rifaz Ahamed wrote:How to split the testcases from testsuite on selenium IDE, if we record the whole application and saved as Test suite?

This has nothing to do with the original post...Start a new topic

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: New to Selenium

Post by IftikharNazir on Thu Sep 19, 2013 11:27 am

I think you are trying to delete the button that is actually not existing.
e.g Suppose you are recording a script and delete the required things. if will be deleted during recording. But next time when you will try to run that script it will not found the delete button. because that button is already deleted.
If the scenario is like this then please let me know

IftikharNazir

Posts : 1
Join date : 2013-09-18

Back to top Go down

Re: New to Selenium

Post by ccox on Mon Sep 23, 2013 11:33 pm

IftikharNazir wrote:I think you are trying to delete the button that is actually not existing.
e.g Suppose you are recording a script and delete the required things. if will be deleted during recording. But next time when you will try to run that script it will not found the delete button. because that button is already deleted.
If the scenario is like this then please let me know
Refer to the OP's last post

ccox
Master
Master

Posts : 205
Join date : 2012-01-06
Age : 31
Location : Denver, CO

Back to top Go down

Re: New to Selenium

Post by Sponsored content Today at 7:16 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