-1

I am trying to do the following and recording it in IDE and trying to re run it..

  1. open google
  2. in search i write "selenium"
  3. click "search" button
  4. just clicking on one of the link and its redirecting to that specific link

it is storing all the steps in IDE but when trying to re-run it its not redirecting to that specific link....i want to know if there any other way...plz reply...

also tried it with java code..

package sel1;

import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;

public class sample1{

    public static void main(String args[]){
    Selenium selenium = new DefaultSelenium("localhost",4444,"*chrome","https://www.google.co.in/");
    selenium.start();
    selenium.open("/?gws_rd=cr&ei=3ajRUq-vIYqBrgeVyYGgCQ");
    selenium.type("id=gbqfq", "selenium");
    selenium.click("link=Selenium - Web Browser Automation");
    selenium.waitForPageToLoad("30000");
    }
}
djangofan
  • 28,471
  • 61
  • 196
  • 289
Shirsh
  • 73
  • 3
  • 9

3 Answers3

0

I would recommend using Selenium Builder instead of Selenium IDE. Also, there is a Jenkins Builder 'executor plugin' that you can use to run your collections of tests.

djangofan
  • 28,471
  • 61
  • 196
  • 289
0

If it does not redirect automatically, and you know the link where it should go you could try this work around, add a step in the Selenium IDE:

selenium.open("URL to the page or site you want it to redirect to");
adbarads
  • 1,253
  • 2
  • 20
  • 43
0

Maybe the page is not getting loaded in time. Try adding a "waitforpagetoload()" before clicking on the link

LoneChaos
  • 203
  • 2
  • 7