Questions tagged [selenium-webdriver]

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

How to close the advertisement using selenium?

#creating path os.environ['PATH'] += r"C://Users/USER/Workspace" #go to the website driver = webdriver.Chrome() driver.get(currenturls) driver.implicitly_wait(20) from bs4 import ...
0
votes
0answers
11 views

Multiple browser sessions are getting loaded even on call of one

I have distributed the login code in three .py file. In first one Browser.locator => I added all the xpath locators and driver as "webdriver.Chrome(ChromeDriverManager().install())" In ...
0
votes
1answer
27 views

selenium radiobutton click is not working

I have tried all the possibilities but am unable to click the radio button Yes or no. It would be great if I get some help. I have observed that Need to take this attribute (<span radiogroup class=&...
0
votes
0answers
22 views

Driver instance of web_driver is not working in python

I am facing an issue in retrieving a browser driver issue as logs says collecting ... collected 1 item ====== WebDriver manager ====== Could not get version for google-chrome with the any command: reg ...
0
votes
1answer
15 views

How to select li element using Selenium in Python

I am trying to automate something on shopify, and depending on what the variable (lets say x) is, I want it to go into that list. For example, if x=2, then from that ul/li(list), how can I make it ...
-1
votes
0answers
18 views

How to extract text inside p tag (inside comment tag or strong tag or span tag) and how to append all the strings extracted into single string

How to extract text inside p tag? I want to extract text inside p tag whether it is commented string or inside strong tag and want to append all the extracted string in a single string HTML Content ...
-2
votes
0answers
28 views

Customized Extent Report

My client requires me to customize extent reports this way: The first one is that the extent report should be named by Test Suite Name(s) - Test Name(s) - Test Log(s) format. For example, the client ...
-1
votes
1answer
22 views

webdriver.chome() not callable or selenium.webdriver.chrome' has no attribute 'get'

I try to open a web page but failed in either case. I got the same error under both the Phycharm and PyhIDE. Please help case (a) line1: from selenium import webdriver line2: web = webdriver.chrome() ...
0
votes
0answers
12 views

Unable to use this in my "AndroidDriver<MobileElement> driver = new AndroidDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap);"

I was get the below error with this "AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"),cap);" and if i have it like this is not accepting "...
0
votes
1answer
29 views

Type mismatch: cannot convert from WebElement to WebDriver?

Type mismatch: cannot convert from WebElement to WebDriver Getting this error in my code why? package testcases; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium....
0
votes
1answer
20 views

Unable to use AndroidDriver<AndroidElement> ad = new AndroidDriver<AndroidElement>(new URL("http://127.0.0.1:4723/wd/hub"),cap); as below

import java.net.MalformedURLException; import java.net.URL; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.remote.DesiredCapabilities; import io....
0
votes
1answer
11 views

How to grab other data inside class with Selenium

<svg aria-label="Unlike" class="_8-yf5 " color="#ed4956" fill="#ed4956" height="24" role="img" viewBox="0 0 48 48" width="...
0
votes
1answer
20 views

Is possible to count tags only in concrete part of page using robot framework and selenium library?

im tring to create solution for dynamic page, where is table that can have 2 or more rows and in every row will be some element i need to interact with. I plan to use loop, but firs of all i need to ...
0
votes
1answer
27 views

Can we Drag and Drop multiple desktop images at the same time to web page using selenium - Java through script ingestion

I found the below article for image upload using script ingestion. But this script is working for a single file at a time but I want to drag and drop multiple files at the same time. My client doesn't ...
0
votes
2answers
33 views

Assertion on Span Tag Value (Selenium Web Driver - C# MSTest - Specflow)

I have a scenario where I want to Assert the UI is displaying "Active". When debugging the assertion, I am trying different methods. This is what I started with; Assert.IsTrue(webdriver.Text....
1
vote
1answer
33 views

Window handling in java selenium

Successfully handled the child window in java selenium but the cursor is not moving forward to the password field. My code is below package perfect; //import java.util.Set; import org.openqa....
0
votes
0answers
30 views

Selenium is skipping the test and throwing the error "SessionNotCreatedException: Could not start a new session" while executing on container

I am executing the Selenium tests usinng TestNG on selenium standalone chrome debug docker container. Below is the Selenium code to instantiate remote web driver: ChromeOptions co = new ChromeOptions()...
0
votes
0answers
28 views

Unable to capture the element using xpath

I'm trying to capture the dynamic code using xpath(Selenium+Java). I want to get that code and store. but it is capturing and always gives no such element exception.my xpath looks like below when ...
1
vote
1answer
34 views

Why do we need to initialize Page Object class again in every Step of Cucumber scenario?

User user1; Given("Add a new User profile") public void addUser(){ PageFactory.initElements(driver, User.class); user1.enterName(...); } Then("Edit a existing User profile") ...
-1
votes
0answers
21 views

What are the benefits of using Dependency injection in Cucumber BDD Selenium framework?

I have made a simple Automation framework using Selenium+Java and Cucumber BDD. Now, one of my team member suggested me to use a Dependency injection framework like PicoContainer. Now, could you ...
5
votes
1answer
108 views

How to accelerate the release process by rethinking test automation

Background: web security company which was acquired by a bigger one. It was a startup with only manual testing, test automation started after the acquisition with a contractor team with mostly UI ...
0
votes
0answers
12 views

How to send text to shadow element using javascript in selenium Java

Element is inside shadowroot. Both ways not working Can anyone help here. Shadow element stored in element named variable and need to enter text in the description field. driver.executeScript("...
0
votes
1answer
37 views

Is it a good design to use a single Webdriver instance in Base Class and then each Page Object class inherits the driver instance in Cucumber Steps?

Im using Cucumber BDD framework with Selenium+Java. Now, I have made on BaseClass.Java in which i declare on public static WebDriver driver; Now, in my .feature file i have many scenarios and in each ...
0
votes
1answer
40 views

Is there a free API for spell and grammar check?

I'm a QA automation engineer looking for a free API or a website for grammar and spell check to automate checks for those errors in web app using Selenium and Java.
1
vote
0answers
52 views

Selenium + C# : How to add list value in cookies?

This is my code: IList<IWebElement> program = driver.FindElements(By.XPath("//*[@id='PnlGAPAncillaryPrograms']/table[2]/tbody/tr[1]/td/table/tbody/tr/td[2]")); driver.Manage()....
0
votes
0answers
19 views

Select multiple values from refreshing list with Selenium webdriver and C#

I have a list with several values. Each time I select a value, the list is refreshed. How can I iterate through the list? This is my code IList<IWebElement> program = driver.FindElements(By....
5
votes
5answers
159 views

Is it necessary to have a very complex Automation framework?

I have seen many QA teams in many organization creating very complex and huge test automation frameworks and use concepts like Java reflections, use a lot utility classes, use many many dependencies/...
0
votes
1answer
49 views

How to execute Selenium script from Linux terminal

I created a .bat file in Windows and launching it from the Windows console and it worked perfectly. Now I got a requirement to execute it from Linux so the .bat file doesn't work, after searching I ...
0
votes
2answers
47 views

What was your most annoying website you have ever found when creating dynamic Xpaths

When interviewing a candidate for QA automation positions, I used to give a website URL and ask them to create a dynamic XPath for a given element. It's mostly on https://opensource-demo.orangehrmlive....
0
votes
0answers
66 views

Selenium drag and drop keeps holding to previous element, resulting in ElementNotInteractableException

I'm trying to drag & drop two elements one after the other. The first element succeeds, but the second one fails with ElementNotInteractableException exception. This happens even when I flip the ...
0
votes
1answer
68 views

Selenium + Python: how can we close all opened tabs except the first tab/main tab?

This is my code, ''' import time from selenium.webdriver.common.by import By from selenium.webdriver import ActionChains from selenium.webdriver.support import expected_conditions as EC ...
0
votes
1answer
22 views

Can someone please help me with keyboard shortcuts using Selenium + Java on webpage?

I have tried using actions class but still not working Actions action=new Actions(getDriver()); String ctrlY=Keys.chord(Keys.CONTROL,"y"); action.sendKeys(ctrlY); Actions action=new ...
1
vote
1answer
34 views

How can I find all values between strong brackets from a javascript website using Selenium?

I'm trying to scrape a javascript website. The website contains a list of products and I need to find out a specific product through this list. All product names are between strong brackets from an ...
0
votes
0answers
138 views

Chrome Driver Maven Error "org.openqa.selenium.SessionNotCreatedException: Could not start a new session."

I am trying to run a selenium-based java test application on Intellij using maven. The problem is that if I run the test in IntelliJ the chrome driver starts and run successfully whereas if I Exeecute ...
0
votes
0answers
17 views

Protractor-user agent for linux fails to load the url in headless mode

I am using Protractor for automation. I am unable to launch the application url in headless chrome on linux machine[gitlab pipeline]. I tried to print the user agent details using await browser....
0
votes
0answers
53 views

unknown error: session deleted because of page crash from tab crashed- [java+Selenium not docker]

I'm running selenium script frequently by connecting gitlab repo to AWS hosted jenkins. previously it runs without any issue. today i got below issue and failed the script. org.openqa.selenium....
0
votes
1answer
44 views

How can we create our own Custom HTML report for Cucumber based Selenium Project?

I have a Cucumber based Selenium framework written in Java. Now, for reporting i use some common plugins/libraries like Extent report. That is fine. However, i want to create my own custom HTML report,...
-1
votes
2answers
129 views

I am stuck with null pointer exception in page object class

Base class package resources; import java.io.FileInputStream; import java.io.IOException; import java.time.Duration; import java.util.Properties; import org.openqa.selenium.By; import org.openqa....
0
votes
0answers
19 views

How to switch to an already open Chrome window in Selenium Webdriver after logging out of another window?

I am using Cucumber to write Test Scenarios. First, I login into a User account and do some stuff. After, that I login into the ADMIN account and update some permissions/other stuff, while the other ...
0
votes
1answer
21 views

ScreenShot taken isn't of what's showing in the screen, but rather that of the header until a page size

When I try to take a screenshot, I added a scroll so that it can take a significant screenshot and not only the header. Right now, the picture is still taken from the header/top of the page. Am I ...
0
votes
1answer
25 views

Override Static Method for TestNg Class

Is there a way to add a screenshot in this Assert method? When my softAssert fails, I need it to take a screenshot here. Method of Assert.class : static public void fail(String message) { throw ...
0
votes
1answer
37 views

Driver switching from one class to another

In the following code, I am trying to get my driver from the class A to class B. Class B can't have a constructor and I tried making a base class, but either Class A gets driver null or Class B gets ...
0
votes
0answers
15 views

ScreenShot when failed not taken Selenium

I am trying to take a screenshot of the page when an exception is triggered. My main Class : @Listeners(CustomListener.class) public class AjoutPanier extends Base { @BeforeTest public void ...
-1
votes
1answer
126 views

Selenium - IndexError: list index out of range

 Customer Order Function <input type="button" name="" accesskey="D" value="D" onclick="go('/tips/SO1R1301.do')" class=&...
0
votes
0answers
21 views

Target selectors in empty iframe with selenium JAVA

So there is an iframe on my page, I have no troubles switching to the iframe itself. The problem is I can't interact with its (text)fields since the iframe is empty (no source). iframe source code: &...
0
votes
0answers
21 views

I have a list with Incident numbers. I want to run a test case for each of the incident. How to pass the values from list into Cucumber feature file?

I have a list with Incident numbers. I want to run a test case for each of the incident. I get the list from an excel file during execution. How to pass the values from list into Cucumber feature file?...
0
votes
2answers
96 views

How to use explicit wait in POM selenium

I am trying to figure out how to use explicit wait in Selenium using the POM structure. I tried to google, but could not find any leads.
0
votes
1answer
26 views

Selenium Couldn't identify App crashes Android

Sometimes app crashes. But Selenium can only handle "noSuchElementException" or "TimeOutException". Does Appium runs a listener or something which tracks if the app is crashed? I ...
1
vote
4answers
62 views

Should automation scripts made in Selenium always contain wait calls?

Should the automation scripts made in Selenium always contain wait calls like implicit, explicit and fluent, or could it be that waits are not needed?
0
votes
1answer
171 views

New pc setup and keep getting WebDriverException: unknown error: Failed to create Chrome process

Any new leads on this issue? I recently switched PC and now facing the same problem so many users faced. It was usually solved with downloading the latest chromedriver.exe or by moving the chrome.exe ...

1
2 3 4 5
97