To access the website https://gem.gov.in/ using Python Selenium and undetected_chromedriver, follow these steps:

I'm facing a challenge in trying to access the website using Python Selenium.

My initial attempt was:

import undetected_chromedriver as uc
import time

driver = uc.Chrome(use_subprocess=True)
driver.get('https://gem.gov.in/view_contracts')
time.sleep(5)

Unfortunately, the site fails to load with no error messages displayed.

I also experimented with using VPN through ExpressVPN, selecting India as my location. However, this didn't yield any positive outcomes.

Seeking Assistance

Any suggestions on how I can successfully open this website?

Answer №1

Utilizing the undetected_chromedriver tool, you can still gain access to the website.

  • Here is a snippet of the code:

    import undetected_chromedriver as uc
    
    driver = uc.Chrome(executable_path='C:\\BrowserDrivers\\chromedriver.exe', use_subprocess=True)
    driver.maximize_window()
    driver.get('https://gem.gov.in/view_contracts')
    WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, "//h2[text()='Advanced search for Contracts and Bid/RA']")))
    driver.save_screenshot("Advanced search for Contracts and Bid.png")
    
  • Snapshot of the Browser:

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Selenium - Element not located using xpath

Searching for a particular element in this webpage, specifically the bid price in the initial row: 196.20p. Utilizing selenium, here is the code I am using: from selenium import webdriver driver = webdriver.PhantomJS() address = 'https://www.trustne ...

Guide for retrieving input from a URL using Python

I have a hyperlink that includes email addresses and I am interested in counting the number of emails with the same domain. The input needs to be taken from the URL provided. import requests def finddomains(input_): domain_frequency = dict() ...

Trying my best to use Selenium to fetch data by executing JavaScript...I guess

I've been attempting to retrieve information from this particular URL. My current code does not manage to extract any of the data as expected. import urllib.request from bs4 import BeautifulSoup url = "https://www.nissanusa.com/dealer-locator.html" ...

Tips for selecting the span element within a dropdown using Selenium WebDriver

Looking for a way to click on a smartphone element in a dropdown using Selenium Web Driver? Check out the code below: <div id="tooltip_menu"> <li class="level0 nav-1 first level-top" <a class="level-top" onclick="event1('Smart Phones&apos ...

use selenium to choose an element

I'm attempting to target a specific element in the HTML code below: <ul class="selectReplace opened"> <li class="default">Standard pizzas</li> <li class="first">Standard pizzas</li> <li class="">Special pizzas</ ...

Utilizing Python to manipulate the 'select' tag in HTML

Currently, I am attempting to retrieve events from an HTML page located at In my efforts to choose different areas using python script, I encountered a challenge with the following snippet of HTML code: <select data-ng-options="key as value.name for ( ...

Eliminate data by column within a pandas DataFrame histogram

Is there a way to eliminate the green column a, that shows up even after specifying grouping by column a and restricting to columns f and g for histogram, without delving into matplotlib or using a for loop? axes = dfs.hist(column=['f', 'g&a ...

Python script for extracting content from iframes without specified sources

Currently, I am attempting to extract the content within an iFrame with the ID "topic" from the following HTML file: https://i.stack.imgur.com/FustQ.png Even after trying methods like Selenium and Beautiful Soup, I am still unable to access the elements i ...

How to pull specific nested dictionary values based on conditions using JINJA2 within Ansible for JSON data extraction

I am attempting to retrieve the CDN domain name associated with a specific Alias from Ansible's cloudfront_facts. The output, in summary form, looks like this: { "cdn_facts": { "ansible_facts": { "cloudfront": { "summary": { "di ...

Python Selenium is unable to locate the Password ID

I am fairly new to Python and Selenium, attempting to develop a program that can log in to a Microsence network outlet. The browser opens successfully and I use the built-in API to access Firefox, but Selenium is unable to locate the Password ID for loggin ...

Determining the presence of non-integer values during the execution of if/while/for statements

I need the user to enter a numerical value into my calculator program. My current objective is to continue displaying an error message and prompting the user to input a number until they provide a valid numeric entry. Below is a snippet of the code I have ...

Setting values for identical rows in a pandas dataframe

Is there a way to identify duplicates in a dataframe based on the 'Customer' column and replace the 'Score' with NA? Customer Score 3a62-4799 500 3a62-4799 NA 3a62-1234 450 3a62-1234 NA I attempted the following approach: X[& ...

Resolving a NullPointerException in Selenium Java JUnit Test Cases

Encountered a puzzling error while running a test in navigateAllMenus.java. When the script tries to locate loginLink, it halts and throws a java.lang.NullPointerException on line 28: _a_LoginPage.loginLink(driver).click();. Despite attempting different x ...

Is it possible to transform an integer into half a byte using the `to_bytes()` method

Let's say I have a series of integers: var = [1, 5, 4, 17, 231, 89] If I wanted to transform these into bytes, I could use the following code: [(i).to_bytes(1, byteorder='big') for i in var] Since each number in var is under 256, it can ...

Ways to exchange information (such as temporary paths) among Django test suites

class MyTestCaseA(TestCase): def setUp(self): # Setting up some initial configurations... def test_case(self): # Executing some test scenarios class MyTestCaseB(TestCase): def setUp(self): # Initializing necessary setu ...

What is the process for establishing a dependency on two distinct JavaScript files, similar to the depends-on feature found in TestNG?

I am faced with a scenario where I have two separate JS files containing test methods, namely File1 and File2. The requirement is that File2.js should only be executed if File1.js has successfully completed its execution. My current setup involves using ...

Executing automated tests with Crontab using Selenium FirefoxDriver

My Debian server is set up and I'm looking to automate tests regularly using crontab or another method for daily execution. I am utilizing Selenium WebDriver 2.45.0 Java Libraries for this task. When running the script via command line, I can succes ...

What is the best way to broadcast messages to multiple clients using Flask-SocketIO?

Currently, I am diving into the world of Flask-SocketIO with a simple chat application in mind. However, I've encountered an issue where messages are not being received by anyone except for the user in the browser. Here's the Python/Flask code sn ...

Tips for swapping the x and y axes in a plot created after using the groupby function in

Check out this example: titanic = sns.load_dataset("titanic") g = titanic.groupby('embark_town').count()['survived'] g.plot(kind='bar') town x count I've been attempting to switch it to count x town, any sugge ...

Behave causing Chrome driver to fail

I'm exploring the use of Behave for BDD, but I've encountered an issue. I already have several Selenium (Python) tests that are running successfully, but when I switch to using behave, I encounter an error stating "chromedriver.exe has stopped wo ...