Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9248419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:56:28+00:00 2026-06-18T09:56:28+00:00

I am using selenium. I have the following code: from selenium import webdriver from

  • 0

I am using selenium. I have the following code:

from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
browser = webdriver.Firefox()
browser.get("http://www.mysite.com")
x = browser.find_elements_by_xpath("//div[@id='containeriso3']/div/a[1]")
hrefs = [i.get_attribute('href') for i in x]

Now, this works.

But I want to do this is on a server which runs on ubuntu command line. This means I cannot use this

browser = webdriver.Firefox()

in my code. What alternative can be used to this through command line?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:56:29+00:00Added an answer on June 18, 2026 at 9:56 am

    You can use HtmlUnitDriver which is headless browser based on Rhino javascript engine.

    http://code.google.com/p/selenium/wiki/HtmlUnitDriver

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have extracted the following code from selenium IDE.(c# remote control) using System; using
I have a c# code.(which is exported from selenium IDE) using System; using System.Text;
I have searched the Selenium Webdriver APi docs hosted on google code. Currently using
I have some tests created using Selenium WebDriver. When I run them using IE
I'm using Selenium for work and I have extract some data from //ul, unfortunately
I have seen lots of questions and solutions on File upload using Selenium WebDriver
I get the following error when running a build from jenkins: I have narrowed
We have the following set up for running parallel tests using selenium grid and
I'm using PHPUnit and Selenium in my PHP project. I have been following instruction
I have written the following code in Selenium 1 (a.k.a Selenium RC) for page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.