The prevalence of virtual business meetings in the corporate world, largely accelerated by the COVID-19 pandemic, is here to stay.…
This is the source code of the webpage ( https://eu.luxpowertek.com/WManage/web/login ) I am trying to login in and click the submit button.
<div id=”loginFormContainer” style=”margin: 0 auto; width: 450px; position: relative;”>
<form id=”loginHolder” action=”/WManage/web/login” method=”post”>
<h2 class=”title” style=”text-align: center; margin-top: 0;”>
Monitor Center
</h2>
<div class=”form-horizontal” style=”padding: 10px 10px 0 10px;”>
<div class=”form-group”>
<div class=”input-group col-sm-12″>
<span class=”input-group-addon” style=”width: 45px;”><img src=”https://resource.solarcloudsystem.com/WManage/web/img/format/icons/user.png?v=2.0.4.4″ height=”16″ /></span>
<input type=”text” class=”form-control input-lg” id=”account” name=”account” value=”” maxLength=”30″ autofocus autocomplete=”off” placeholder=”Please enter username”>
</div>
</div>
<div class=”form-group” style=”margin-bottom: 10px;”>
<div class=”input-group col-sm-12″>
<span class=”input-group-addon” style=”width: 45px;”><img src=”https://resource.solarcloudsystem.com/WManage/web/img/format/icons/key.png?v=2.0.4.4″ height=”16″ /></span>
<input type=”password” class=”form-control input-lg” id=”password” name=”password” maxLength=”50″ placeholder=”Please enter password”>
</div>
</div>
<div style=”width: 100%; margin-bottom: 10px;”>
<a href=”forgetPassword” style=”float: right; color: inherit;” target=”_blank”>Forget password?</a>
<div style=”clear: both;”></div>
</div>
<div class=”form-group”>
<button type=”submit” class=”btn btn-lg btn-success” style=”width: calc(100% – 115px); margin-right: 5px;”>Sign in</button>
<a class=”btn btn-lg btn-default” style=”width: 106px;” href=”/WManage/web/register”>Register</a>
</div>
<div class=”form-group” style=”margin-bottom: 5px;”>
<a href=”/WManage/web/login/viewDemoPlant?customCompany=” type=”button” class=”btn btn-lg btn-success” style=”width: calc(100% – 115px); margin-right: 5px;”>Visit demo station</a>
<a class=”btn btn-lg btn-default” style=”width: 106px;” href=”/WManage/web/warranty/register”>Warranty</a>
</div>
</div>
</form>
</div>
Here is my python code with all the various different ways I have tried so far to click the button. The username and password are just dummy code in this sample.
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.service import Service
service = Service(‘/usr/bin/chromedriver’)
driver = webdriver.Chrome(service=service)
driver.get(‘https://eu.luxpowertek.com/WManage/web/login’)
username = “uyuytuyreue745@mygmail.com”
password = “kinghferyrt”
# find username/email field and send the username itself to the input field
driver.find_element(“id”, “account”).send_keys(username)
# find password input field and insert password as well
driver.find_element(“id”, “password”).send_keys(password)
# click login button
driver.find_element(By.XPATH(“(//button[contains(text(),’Sign In’)])[2]”));
So the actual submit button has no ID and this is where I think I am getting confues will all the different ways of selecting it like by Selector, By XPATH by.xxxxx etc
Sign in
Any help would be most appreciated, also it appears that the code syntax of selenium has changed over the years as many code samples I have found do not work any more like driver.find_element_by_xpath which is now (I believe) driver.find_element(By.XPATH,xxxx)
Retail analytics in eCommerce leverages AI and ML to transform business operations, enhancing decision-making and competitive edge. The blog discusses how it enables retailers to analyze consumer behavior, optimize inventory, and craft targeted marketing strategies. With capabilities to predict trends and manage inventory efficiently, retail analytics proves crucial in meeting consumer demands and driving business success. Essential for modern eCommerce platforms, it uses detailed data from multiple sources to offer insights that help personalize customer interactions and improve overall business performance.
The post Importance of Retail Analytics in the eCommerce Industry first appeared on TestingXperts.
How to click on a link that is under a table element, but that is not visible on first page. There are pagination links “previous” & “next” on the page, and i want to iterate over multiple pages and find my link “a” tag based on Link text.
if link matches the string, then only click on the link, otherwise keep clicking “Next” in the pagination.
List<WebElement> links = driver.findElements(By.tagName(“a”));
int size = links.size();
for (int i = 0; i < size; i++) {
if (links.get(i).getText().equalsIgnoreCase(LinkMatchValue)) {
driver.findElement(By.xpath(“//a[contains(text(),'” + LinkMatchValue+ “‘)]”)).click();
} else {
driver.findElement(By.linkText(“next”)).click();
}
}
==================================================================================
<table id=”table1″>
<thead>
<tr>
</td>
</tr><tr class=”classA”>
<td><a href=…”>Link 1</a></td>
</tr>
<td><a href=…”>Link 1</a></td></tr><tr class=”even”>
<td><a href=…”>Link 2</a></td></tr><tr class=”even”>
<td><a href=…”>Link 3</a></td></tr><tr class=”even”>
<td><a href=…”>Link 4</a></td></tr><tr class=”even”>
<td><a href=…”>Link 5</a></td></tr><tr class=”even”>
<td><a href=…”>Link 6</a></td></tr><tr class=”even”>
</tbody>
</table>
Contracts are a gold mine of data, but manually digging for it is a nightmare. It’s slow and error-prone and…
Introduction You’ve likely heard the phrase, “measure twice, cut once.†Reconciling your balance sheet follows the same logic, but in…
How to Use a PHP GitHub Webhook Package to Automatically Update the Code of an Application When the Code Changes…
One time passcode Vue 3 Input Component. Continue reading on Vue.js Feed » Source: Read More
The Play ransomware group has claimed responsibility for an attack on the Kansas City Scout System which forced its staff…
Data sourced from over 40 million exposures that pose high-impact risks to numerous critical business entities revealed that Active Directory…
A Russian operator of a now-dismantled BTC-e cryptocurrency exchange has pleaded guilty to money laundering charges from 2011 to 2017. Alexander Vinnik,…
Google on Monday announced that it’s simplifying the process of enabling two-factor authentication (2FA) for users with personal and Workspace…
The RSA Conference 2024, the world’s biggest cybersecurity event, is currently underway at the Moscone Center in San Francisco. Over…
How safe is your comments section? Discover how a seemingly innocent ‘thank you’ comment on a product page concealed a…
The U.S. Secretary of State Antony Blinken unveiled an International Cyberspace and Digital Policy Strategy on Monday, outlining the Biden…
The personal data of an unspecified number of active UK military personnel had been compromised in a significant Ministry of…
Organizations want to move their critical Oracle workloads to Amazon Relational Database Service (Amazon RDS) for Oracle with minimal downtime…
To remove some of the confusion, here’s a list of misconceptions about Specificity in CSS Source: Read MoreÂ
If we’re being honest with ourselves, the transformative new era hasn’t been so transformative yet. We were given the ‘most profound technology since…
Today, we’re back with some nice design finds: hover effects on images. These effects enhance images by revealing additional details…