212 questions
0
votes
0
answers
43
views
Selenium HtmlUnitDriver failing to load html elements
I am trying to use the Selenium HTMLUnitDriver to read the contents of a page (https://mattermost.com/security-updates/). If you scroll down right as the page loads in a browser, you'll see that the ...
1
vote
2
answers
201
views
How to prevent HtmlUnit from throwing an error that is in the javascript?
I'm trying to login to one website, and after entering successfully username and password, and after clicking on submit button, I'm getting the following:
2023-05-27 16:46:41.864 ERROR 296 --- [nio-...
2
votes
1
answer
3k
views
How to fix vulnerability(CVE-2022-34169) in selenium:htmlunit-driver:3.62.0. It is coming from Xalan Java » 2.7.2 as a direct vulnerability
How to fix vulnerability(CVE-2022-34169) in selenium:htmlunit-driver:3.62.0. It is coming from Xalan Java » 2.7.2 as a direct vulnerability
we are using org.seleniumhq.selenium:htmlunit-driver:3.62.0 ...
1
vote
2
answers
140
views
Why am I getting UnknownHostException using HtmlUnitDriver?
I am writing a test that should get only the URL from the redirect, there is no need to load the non-existing page. Every time I get this exception:
java.lang.RuntimeException: java.net....
0
votes
1
answer
562
views
Selenium 4 HtmlUnitDriver Button not clicked
I'm using Selenium 4 and HtmlUnitDriver with java, I have a problem with executing a form button. no error showed but I'm sure that the button was not clicked according to the output console result.
I ...
1
vote
1
answer
128
views
Unable to Access a website using FirefoxDriver and HtmlUnitDriver
I'm trying to access the website using FirefoxDriver but I'm getting a not a valid url exception
I also tried with HtmlUnitDriver there the website title come back as null
I tied the old and new ...
1
vote
1
answer
72
views
Unable to click buttons with HtmlUnitDriver but able to click buttons with FirefoxDriver
I have a code using Selinium HtmlUnitDrive. I'm able to access the website and click the except cookies but I can't seem to click the play demo button. I don't what is a problem because I can click ...
5
votes
1
answer
279
views
Why would HtmlUnitDriver not Locate WebElements but FirefoxDriver able to locate the same WebElements
I have a question.
What makes FirefoxDriver be able to locate WebElements and click on them in a java code but when running the same code with HtmlUnitDriver the same WebElements are not located. Also ...
-1
votes
1
answer
80
views
How to fix this HtmlUnit test giving errors
I have a HtmlUnit test on the attached code. When I run the code I get the following error:
0
votes
1
answer
248
views
How to switch window on HtmlUnit
I have a selenium code below which switch window to another window. How do I do the same thing with HtmlUnit not HtmlUnitDriver.
Set windows = driver.getWindowHandles(); List windowsH = new ArrayList&...
0
votes
1
answer
685
views
How to use HtmlUnitDriver using Selenium in python?
I'm using selenium-4.1.0 and I'm searching for the lightest webdriver possible (for speed purpose).
I heard about HtmlUnitDriver, but when using python, I need to run a selenium server before trying ...
0
votes
0
answers
144
views
Unable to fetch html for the websites loading at client side
I am unable to fetch/render the html for the client-side html loading, I tried using HtmlUnit and Jsoup but both of them are not working. I am only getting a blank html.
try (final WebClient webClient ...
1
vote
1
answer
2k
views
Selenium unable to locate element by id/name
This question has been asked many times, but none of the answers seem to work. I am trying to simply locate the search bar on the google front page (https://google.com). If looking at the inspector, ...
0
votes
1
answer
422
views
Setting up Selenium correctly
I have been trying to install Selenium for about a day now, and I can´t get it to work. First, I just downloaded the standalone jar and added it as a user library. That did work out fine, until I ...
0
votes
1
answer
2k
views
TypeError: Cannot find function entries in object function Object()
I'm using htmlunit to get this webpage
https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies
Maven dependency:
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
...
0
votes
0
answers
178
views
How to use HtmlUnit Driver with Selenium to input into a password field that has JavaScript keypress functions on it?
My code works with Chrome Driver. It also works with the HtmlUnit driver for the username field. And it also works for the password field if I don't enable JavaScript for the driver. However, For some ...
-1
votes
1
answer
215
views
HtmlUnitDriver to invoke local html file
I am trying to invoke a locally stored html file using the get() method of the HtmlUnitDriver, but the page is not getting loaded. I tried to get the page source and I got 404 not found as the ...
-1
votes
1
answer
205
views
how to maximise window size in htmlunit driver?
I am running selenium test using HtmlUnitDriver but at some point test keep failing. Is there any way we can maximize the window size in HtmlUnitDriver?
1
vote
2
answers
768
views
Submit form without button in selenium
On the page I want to test I have a form like this:
<form method="post" action="target.html">
<input id="myInputField" />
</form>
A normal use-case ...
-1
votes
1
answer
413
views
How to send the login credentials using HtmlUnitDriver and Selenium Java
I'm tring to send the login credentials within the username and password field https://www.vignanits.ac.in/server/moodle/login/index.php which needed to be automated using HtmlUnitDriver but facing ...
1
vote
0
answers
123
views
I can't use HtmlUnitDriver with Maven in my JavaFX project
I'm trying to use HtmlUnitDriver in my JavaFX project but when I add HtmlUnitDriver I get these Errors
I tried different version and still same error I dont know what to do
Caused by: java.lang....
0
votes
2
answers
285
views
Unknown Host in selenium HtmlUnitDriver
I am getting Unknown Host as a return of driver.getPageSource()
public static void main(String[] arg)
{
HtmlUnitDriver driver = new HtmlUnitDriver();
driver.manage().timeouts().implicitlyWait(15,...
2
votes
1
answer
785
views
Unable to run java junit selenium code for my test case
I recorded the testcase steps using Katalon IDE and I was able to play the recording successfully using private browser session.
I now wish to play the testcase in Linux using headless browser.
...
0
votes
1
answer
57
views
How to scrape html code which is inside JavaScript in selenium with htmlunitdriver?
I wanna access input field, for entering username in selenium with headless browser
And this is the code
document.write("<input name='username' type='text' id='username'/>");
How to access ...
0
votes
1
answer
207
views
Handling Alerts in HtmlUnit
How the alerts in HtmlUnit will be handled? For Supposeenter image description here
It is not required to click "OK" in htmlUnit. But in selenium, it will throw UnhandledAlertException. How it is ...
0
votes
1
answer
389
views
SPNEGO authentication with Selenium Web Driver
I have SPNEGO authentication for my applications and am doing automated testing using selenium HtmlUnitDriver.
I have tried running the browser automation code inside login context of SPNEGO ...
0
votes
0
answers
450
views
How to authenticate proxy using HtmlUnit driver?
I'm using Selenium in order to scrape a website, and want to send my requests through a proxy. How do I authenticate requests to the proxy server using HtmlUnit driver?
I've successfully ...
1
vote
0
answers
21
views
How to find out whats going wrong in HTMLUnitDriver/Firefox with a page that closes itself?
I am analysing websites often with Firefox (66) and it's Network Analysis which is very helpful.
Now I have a situation where I open a page and this page opens another one. Within this last page I ...
1
vote
1
answer
67
views
search element with dynamic ID using java htmlunit
From a web page, I want to search all h3 whose id starts with 'Tomcat_' and ends with '_released'
<h3 id="Tomcat_9.0.19_Released">
<span class="pull-right">
2019-04-13
</span&...
0
votes
0
answers
59
views
HtmlUnit read youtube chat
I am trying to read youtube chat messages using HtmlUnit
@Test
void test() throws IOException {
try (final WebClient webClient = new WebClient()) {
webClient.getOptions()....
2
votes
1
answer
1k
views
Unable to run the script through htmlunit driver in selenium
I'm trying to run the htmlunit driver but It's failed to execute the script
Code:
public class Testworking
{
public static void main(String args[])throws Exception
{
WebDriver ...
1
vote
0
answers
897
views
How to run Selenium automated tests with HtmlUnit driver and Spring Boot?
Not able to configure and run Selenium tests after configuring HtmlUnit driver in my Spring Boot application.
Getting an error when I execute the test.
BaseSeleniumTests.java
public abstract class ...
0
votes
0
answers
264
views
How to fix "java.lang.error" in java HtmlUnitDriver
I'm trying to log into a website with HtmlUnitDriver and I keep getting a java.lang.error.
Ive added multiple jars to fix my com.gargoylesoftware.htmlunit.browserversion error which fixed that but ...
0
votes
1
answer
1k
views
org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: Exception invoking getOffsetTop with HtmlUnitDriver & Selenium
Whenever I try to set HtmlUnit enableJavaScript to true, it returns this error:
org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: Exception invoking getOffsetTop
...
0
votes
0
answers
74
views
Selenium : HtmlUnit UnexpectedTagNameException error with dropdown box [duplicate]
Currently, I am using HtmlUnit as my driver. With Selenium, I was attempting to write a dropbox choice selector, that can choose a state. as shown
I keep on receiving this error:
org.openqa....
0
votes
1
answer
634
views
Jmeter - Selenium/Webdriver Support : HTMLUNIT driver error
java.lang.IllegalArgumentException: Browser name must be htmlunit
at org.openqa.selenium.htmlunit.HtmlUnitDriver.determineBrowserVersion(HtmlUnitDriver.java:315) ~[htmlunit-driver-2.33.0.jar:?]
at org....
0
votes
3
answers
2k
views
how to resolve htmlUnit WrapsDriver Error
I'm running test with HtmlUnit with selenium 3.13 jar, browser launches successfully, but after than it stops working with below error.
> Exception in thread "main" java.lang.NoClassDefFoundError: ...
2
votes
1
answer
3k
views
HtmlUnitDriver does not load javascript when navigating a page from an url
Here is my problem, I'm trying to load my website page for testing it but when i look at the html I get from the HtmlUnitDriver, elements displayed with javascript are not present.
I am using selenium-...
0
votes
1
answer
529
views
Can't open any page with java selenium HtmlUnit (maven install)
Trying a simple code to open a web page using java HtmlUnitDriver. I don't get any compilation errors but the driver.get(url) never opens any webpage.
Here is my pom.xml:
<?xml version="1.0" ...
0
votes
2
answers
108
views
HtmlUnit and HTTPS pages
I'm trying to make a program that checks avaliable positions and books the first avaliable one. I started writing it and i ran into a problem pretty early.
The problem is that when I try to connect ...
2
votes
1
answer
1k
views
org.openqa.selenium.WebDriverException: Browser failed to start, test in fluentlium
I want to run simple example in fluentlium but I get an exception in driver
My code:
Config.java
public class Config extends ConfigurationDefaults {
@Override
public String getWebDriver() {
...
6
votes
1
answer
21k
views
Difference of Headless browsers for automation
The main difference is, execution on GUI bases and non GUI bases(Headless).
I am looking for difference between all Headless browsers with each other, But unfortunately I didn't find any. I go ...
-1
votes
1
answer
153
views
How to create a list of the items under Pick a Category (US) rendered differently through HtmlUnitDriver and HtmlUnit headless browser?
How to create a list of the items under Pick a Category (US) from amzscout rendered differently through HtmlUnitDriver and HtmlUnit headless browser?
Using GeckoDriver / Firefox and ChromeDriver / ...
0
votes
1
answer
816
views
IllegalStateException: Unable to locate element by name for com.gargoylesoftware.htmlunit.UnexpectedPage with HtmlUnitDriver while getTitle()
Here is my basic code for launching HTMLUnit browser and getting the title. while running the code i am getting the title as null and later it is throwing the following execpetion:
Jars used:
...
0
votes
2
answers
176
views
Cannot find the WebElements with Selenium that I can see from the Chrome browser's inspect window
Edit: It works with the chrome driver but not with HtmlUnitDriver, why?
I am trying to get WebElements with classname = "cat-pick_i"
I can see these elements in Chrome's inspect window as seen here
...
2
votes
1
answer
283
views
Maven picking up dependency of new version
I have a Pom where I have included a dependency for selenium HTML Unit driver. It has a dependency with HtmlUnit v2.18. But While viewing the dependency tree, I was able to see that its picking up ...
0
votes
1
answer
270
views
PayPal Sandbox not able to find password field
I'm currently using HtmlUnitDriver, and while I am able to set the username, I keep getting an error that Selenium could not find the password field. I am using JavascriptExecutor to set these values ...
0
votes
1
answer
124
views
Htmlunit JavaScript Execution
I am planning to develop code for measure Web page loading time using HtmlUnit
Below is my code
public static void main(String[] args) throws IOException {
final WebClient webClient = new ...
0
votes
1
answer
922
views
Error in method invocation when executing java scripts in selenium using jmeter
I'm getting following error while try to execute the java script within my selenium code.
Error:
Response message: javax.script.ScriptException: Sourced file: inline evaluation of: import org....
1
vote
1
answer
610
views
HTML unit driver with selenium not click the button
I want to click a element with onclick tag in html unit driver. But it didn't work.
Page source:
I tried following method.
click method;
public HtmlUnitDriver driver = new HtmlUnitDriver(...