1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Problem in starting selenium

Discussion in 'Software Development' started by saggy, Jan 11, 2011.

Thread Status:
Not open for further replies.
  1. saggy

    saggy Thread Starter

    Joined:
    Jan 11, 2011
    Messages:
    2
    Hi all,

    I'm getting issue in starting selenium. Actually my thread class has selenium.start() in run() method. So when I'm using below lines of code,

    //some another class
    class someclass{

    ScrapeThread nidleThread = new ScrapeThread("nidleThread");
    Thread scraper = new Thread(niidleThread);
    scraper.start()
    }

    as thread.start() method internally calls run() method, so in run() method of thread class only first two three lines of code are getting executed and when it executes comes to selenium.start() and executes, then selenium is giving issue in starting means I can see only two commands getting executed in command history of selenium remote and then getting struck there.

    But when i m using below code and directly calling the run() method of my thread class

    //some another class
    class someclass{
    ScrapeThread nidleThread = new ScrapeThread("nidleThread");
    nidleThread.run();
    }
    here it's working properly and I'm getting proper output as I want.

    What could be the issue in starting selenium when I'm executing the thread in normal way i.e. by calling scrapper.start() method?

    //in thread class
    run(){
    selenium = new DefaultSelenium(config.getHost(), Integer.parseInt(config.getPort()), config.getBrowser(), config.getUrl());
    selenium.start();
    }


    Thanks in advance
    Saggy
     
  2. patricklee

    patricklee

    Joined:
    Jan 18, 2011
    Messages:
    11
    Which Selenium are you trying to run IDE or RC?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/973986

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice