Selenium KEDA encountered a FailedGetExternalMetric Warning due to the inability to retrieve the external metric

Currently, I am utilizing selenium KEDA for auto-scaling purposes. However, upon reviewing the HPA logs, I stumbled upon an error stating that it FAILED to retrieve the Metrics. I would greatly appreciate any guidance or assistance in resolving this issue.

https://i.stack.imgur.com/I86j7.png

Answer №1

After troubleshooting, I was able to successfully resolve the issue at hand. It turns out that the problem originated from the selenium graphql URL specified in the KEDA scaled object yaml file.

To rectify this, I made a modification by appending the namespace to the URL, which proved to be the solution I needed.

Here is the updated apiVersion: keda.sh/v1alpha1 configuration for the ScaledObject:

kind: ScaledObject
metadata:
name: selenium-chrome-scaledobject
namespace: default
labels:
deploymentName: selenium-node-chrome
spec:
minReplicaCount: 0
maxReplicaCount: 8
scaleTargetRef:
name: node-chrome-deployment
triggers:
- type: selenium-grid
metadata:
url: 'http://selenium-hub.default:4444/graphql'
browserName: 'chrome'
unsafeSsl : 'true'

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

Tips for selecting a button on Yahoo Finance with Selenium

My goal was to automatically extract "quarterly" data from financial reports on Yahoo Finance, but I couldn't figure out how to do it. I initially tried clicking on "the quarterly button" on the financial page (), however, the code below didn't w ...

Encountering a NullPointer Exception while attempting to locate a WebElement in the code

My current challenge involves locating a particular webelement with the code snippet below: private WebElement loc_Start; public void clickButton() { loc_Start.findElement(By.xpath("//button[contains(text(), 'Start')]")).click(); } Upon i ...

The quit function in IE 11 webdriver is not functioning properly

Just starting to explore Selenium and encountering a bit of a roadblock. While I can easily close browser windows in Firefox, the same process doesn't seem to work as smoothly in IE. Check out the example test below which results in leaving an open I ...

Encountering an issue with Selenium and FirefoxProfile while trying to load a profile. A Python script is being called from PHP

While running my Python script, I encountered the following code: firefox_profile = webdriver.FirefoxProfile() self.driver = webdriver.Firefox(firefox_profile=firefox_profile) Executing the script from bash was successful. However, when attempting to cal ...

Is it possible to pass values using sendkeys in Selenium in order to select an item from a Bootstrap dropdown menu?

Is there a way to pass values for a bootstrap drop down menu using Selenium instead of selecting them? Can we use sendKeys in Selenium to achieve this? I need to input values CSS, HTML, JavaScript without manually selecting them during automation. <d ...

Encountering a crash issue with JMeter's Selenium Sampler while attempting to click on a button with the Phantom

After building a JMeter Project, I have been utilizing the WebDriver Sampler (Selenium) to monitor response times during interactions with a particular feature on a webpage. To test my project, I have experimented with both Firefox and Chrome Driver confi ...

Python, please assist me in retrieving the index that corresponds to this particular item in the list

Within a CSV file, I have two columns: one for numbers (which may repeat) and another for links. Each row in the file represents a distinct element. I have organized these into two separate lists: numbers=[8,7,9,4.3,4.8,5,...] links=["Link1","Link2","Link ...

Webdriverio: exploring the window object

I am experimenting with Webdriverio Testrunner using Selenium Standalone. I have encountered an issue while trying to check a global variable (window.myVar) in one of my tests. When attempting to return the window object, I am getting unexpected results i ...

Python code for clicking a button using Selenium

I'm having trouble closing popup windows in Selenium with Python. The button labeled "joyride-close-tip" is functioning correctly and closes the window, but the other two buttons are not working. What could be causing this issue? Even though I copied ...

What is the best way to merge these approaches in Python that have comparable functionalities?

These 2 methods are quite similar, but one posts in English groups and the other in Dutch. How can I streamline this code without sacrificing functionality? Here is the code: message = "Hi" messageNL = "Hoi" def post(status, filename_tmp, filename_txt): ...

Using Python and Selenium to automate navigation in a web browser

I've encountered a roadblock while scraping data from a website using Python and Selenium. Currently, my script only scrapes the first 10 pages for the month of July. It calculates the page number by taking the int value of the previous sibling of the ...

Code for Testing Cucumber with JUnit

My attempt to utilize webdriver in order to launch the cucumber with junit and open a browser was partially successful. While it recognizes everything, it is failing to open the web browser or execute the desired actions. Below is the snippet of code I a ...

Choosing the Date Picker in Selenium WebDriver: A Step-by-Step Guide

Currently delving into Selenium WebDriver with a focus on Java. My goal is to navigate through a date picker dropdown and select specific values for date, month, and year. Here is an example of the HTML tag: <dd id="date-element"> <input id="fro ...

Tips for Passing a BaseURL Command Line Argument in Java for Selenium WebDriver

I have successfully created a runnable jar for my Selenium WebDriver suite. Now, I need to test this suite on multiple base URLs as the baseURL may change based on requirements. Can someone please provide guidance on how to achieve this? Is it possible to ...

I am attempting to retrieve the current page's URL, but unfortunately, I am unable to do so at the moment

public class AutomatingWithChrome { ChromeDriver driver; String mainUrl = "http://example.com"; String secondUrl = "https://www.facebook.com/"; public void launchBrowser() { System.setProperty(&qu ...

A guide to utilizing Selenium and Python to retrieve the content of the <td> element inside a table

Is it possible to extract the value 1 from the table using Selenium? I've been having trouble finding a suitable method. <td width="1%" style="text-align: right">1</td> This is how the HTML of the page appears: <tr class="linhaPar" ...

Issue encountered when initializing Selenium WebDriver due to NoElementException

Here is the code snippet I'm working with: package pageobjects; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.safari.SafariDriver; public class MainPage { ...

How to extract and print content within a div element using Selenium and Python

Looking to extract data from a website that has information nested under a specific div tag. Here is an example: <div> id="searchResults" class="multiple-view-elements" <span>name</name> <span>info</name> <span>info< ...

Issue encountered while attempting to download the most recent version of chromedriver

Currently, I am using Chrome version 115.0.5790.110 and Selenium version 4.10.0. Below is my Python code snippet: from selenium import webdriver from selenium.webdriver.chrome.service import Service from webdriver_manager.chrome import ChromeDriverManager ...

Safari automation test encounters hanging issues with driver execution

Safari Version: 11.0.2 MAC Version: 10.12.6 Mac OS Sierra selenium-java Version: 3.5.3 Language: JAVA For some reason, when running a selenium test using the Safari Driver, it seems to hang after completing a few steps. This issue doesn't seem to fol ...