Robot Framework HTML5 - WebDriver support - Although the WebDriver instance of the browser fails to login, it works successfully when the browser is opened manually

Robot Framework Version 2.8.3 Selenium2Library Version 1.4

I am encountering an issue related to the controls utilized in the application being tested. Instead of using ids for controls, like the traditional coding approach, my application has been designed with 'CSS - Class'.

For instance, a button is coded as:

The identifier "btn-do-login" is defined in a CSS file.

When I input ids into the username and password fields, and then use the Click Element keyword with btn-do-login, the element is clicked but the data isn't submitted to the host like it would with the Submit Form keyword.

It's important to note that the application doesn't include any form; instead, there is a Div associated with a CSS class.

Below is the complete hierarchy:

<div class="login-form">
    <div class="form-element-username"> … </div>
    <div class="form-element-password"> … </div>
    <div id="btn-do-login" class="wbutton-login"> … </div>
</div>

Any assistance on how to post data to the host would be greatly appreciated.

Additionally, even when manually entering login credentials on the WebPage opened by WebDriver and attempting to submit it manually, I still encounter a javascript error and the page isn't submitted. To log in manually, I must close the browser instance opened by WebDriver and manually open a new instance.

Lastly, can anyone confirm if Selenium2Library supports HTML5?

This outlines what I've done so far:

>    Login With Valid Credentials   
>>        Input Text     ${id_login_email}    ${country}
>>>       Input Text     ${id_login_password}    ${PASSWD}
>>>>      CLick Element    btn-do-login

The variables are defined in separate Python files and imported as VARIABLE in the setting table.

Thank you in advance.

--Raj Sarodaya

Answer №1

After numerous trials and errors, I finally managed to get it to work. The issue with the submit button stemmed from the javascripts not loading properly due to my system being behind a proxy without the correct IP settings in the browsers.

Unlike many other websites that didn't require a proxy, this particular case required some troubleshooting on my end to resolve.

:P

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 displaying javascript code containing variables in the executeScript method

I'm currently working on a selenium script that involves executing JavaScript code using the executeScript method. I've run into an issue when it comes to handling single (') and double quotes (") while passing variables. Not Working: js.e ...

Transform the checkbox selection into an active hyperlink upon being selected

Currently, I am in the process of designing a form that allows visitors to select items they would like to view by checking relevant checkboxes. Upon clicking a Request button, the URLs of the selected items are displayed. I aim to have the URL appear as ...

What is the best way to display a deeply nested array of unknown length without causing the browser to crash?

My data structure is quite complex and looks a bit like this: [{ name: 'name1', nodes: []}, { name: 'name2', nodes: [ { name: 'name21', nodes: [ { name: 'name211', nodes: []}, ...

Enable the script tag with the type "module" only under certain conditions

Attempting to dynamically enable script tags in HTML using the code below does not yield the expected results. function loadScript() { document.querySelectorAll('script[type="text/skip-hydration"]').forEach((script) => { script ...

One of my Bootstrap modals is able to scroll while the other remains non-scrollable when I open them simultaneously

I trigger the first modal using JavaScript and open other modals sequentially. While the first modal and some of the subsequent ones work properly, there is an issue with the second and third modals. The problem is that the scroll bar goes to the backgroun ...

Jquery failing to trigger click() on a div with an id

Within my erb file, there exists a script that looks like the following: function checkJquery() { if(window.jQuery) { jQuery(document).ready(function() { alert('onready'); $('div#habla_topbar_div').click(function( ...

Tips for detecting HTML updates using Python requests

My goal is to monitor a page for updates while maintaining the same session and cookies, without sending a completely new request. How can I determine if there are HTML updates within my current request? The page will redirect but keep the same URL. This ...

Relocate the HTML checkbox to the left side of its width

I need an answer that utilizes only CSS, without any JavaScript. In a form, I have a checkbox as follows: <label for="autologin">Remember Me</label> <input type="checkbox" class="checkbox" id="autologin" name="autologin" value="1"> <d ...

Activate the capture property for the file selection based on the label that is selected

This is a form that consists of two labels: <form method="POST" action='/process' enctype="multipart/form-data"> <div> <label for="file" class="upload-button"><i class=" ...

What is the quickest way to redirect a URL in WordPress?

Is it possible to redirect a URL instantly in WordPress using this script code? JavaScript Code: jQuery(document).ready(function() { var x = window.location.href; if (x == 'http://example.com/') { window.location.hr ...

Is there a way to change the color of a checkbox (both the box and font) in the disabled state using material ui

When using Material UI v4.9.12, it is possible to create a customized checkbox with a specific color that remains fixed: const GreenCheckbox = withStyles({ root: { color: green[400], '&$checked': { color: green[600], }, ...

A step-by-step guide on customizing the background color of a Dialog in Angular Material (Version 16)

I've been attempting to modify the background color of my Angular Material Dialog by utilizing the panelClass property in the MatDialogConfig. Unfortunately, I'm encountering a partial success. I am aiming to set the background color as red (jus ...

javascript get the value of the text field

Is there a way to calculate even and odd numbers using a text field for entering the range of values and a select tag to choose between even and odd? How can I retrieve the value from the text field in order to pass it to the calculation function? Custom ...

Struggling to identify and extract the correct elements for web scraping on a website using Selenium in Python

I have been attempting to extract information from this website, specifically utility bills data that is displayed after entering certain details. The website mandates inputting information and selecting certain options. I have been researching Selenium a ...

Guide to manually creating and accessing an array of objects in Firebase using Angular

I have successfully generated a dynamic list of cards from an array of objects stored in the user.component.ts file. user.component.ts import { Component, OnInit } from '@angular/core'; import { AuthService } from '../service/auth.service& ...

dynamically assigning a style attribute based on the dimensions of an image retrieved from a URL

My aim is to determine whether or not I should use an image based on its dimensions. To achieve this, I came across a function on stack overflow that can retrieve the dimensions of an image just by using its URL. Here is the code snippet they provided: f ...

How can you conceal an HTML element when the user is using an iOS device?

I need the code to determine if a user is using an iOS device and, if not, hide the HTML input type "Play" button. So, I'm uncertain whether my iOS detection is correct, the hiding of the "Play" button in the code, or both: <!DOCTYPE html> < ...

JavaScript code for styling changes is not functioning as expected

Check out this code snippet: var moving_nav = document.getElementById("moving_nav"); var logo = document.getElementById("logo"); setInterval(function(){ var scrolled = window.pageYOffset || document.documentElement.scrollTop; if (scrolled >= ...

Extract the content within an HTML element that is not within a header tag

Is there a way to extract the inner text from HTML using HTMLAgilityPack in C#, excluding text within any <h1-6> tags? I prefer not to use Regular Expressions and stick to HTMLAgilityPack. This is my current approach: var document = new HtmlDocumen ...

I encountered an issue while running a cucumber test that involves interacting with a confirm dialog using selenium webdriver

I'm struggling to make my cucumber test accept a confirm dialogue. I've installed selenium-webdriver and keep encountering this error: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) (Selenium::WebDriver::Error::WebDriv ...