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
3
votes
0answers
73 views

How to avoid using same data in parallel execution

This question is similar to How to manage application data when running multiple tests in parallel? But I want to know if there's a way or listener in testNG that will lock certain method when running ...
1
vote
1answer
198 views

Getting error - …either make it static or add a no-args constructor to your class

I am writing test scripts with Rest-Assured java. I have two classes ApiMethods and AppMethods belonging to one package and another test package called apiTests using the methods created in the ...
1
vote
4answers
603 views

How to initialise the PageObject Class using PageFactory only ONCE in a Step Definition Class in a Selenium Webdriver + Cucumber project?

I am making a Regression suite Automation project using Selenium Webdriver, Java, Cucumber, Maven etc. Now, the problem is that I have multiple Page Object classes that I initialise again and again ...
-1
votes
1answer
117 views

Select dropdown is not working in selenium

I have got the error org.openqa.selenium.support.ui.UnexpectedTagNameException Element should have been "select" but was "span". Can you please help? I have tried this code: ...
0
votes
0answers
114 views

Sikuli4Net is giving me an error on C# selenium

I was trying to implement image based verification on my selenium project with the help on Sikuli4Net. After following some tutorials I'm getting an error as below. The request was aborted: Could not ...
0
votes
1answer
1k views

Unable to fill the card details for Payments using Selenium at the merchant's checkout page

I have just started learning Selenium web automation tool and wanted to auto-fill the card details on the merchant's Payment Page but unable to do so using Selenium. Below are the things which I tried....
1
vote
1answer
313 views

Looking for a solution to run selenium tests on EC2 with GUI

My selenium tests are triggered from Jenkins server which in AWS EC2-Ubuntu. But in EC2, since tests run on chrome-headless, debugging has become difficult. I tried XVFB display but had unresolved ...
0
votes
0answers
1k views

Not able to run my test from testng.xml file

I'm not able to run by test case from testng.xml file after run of file I'm getting that Total tests run: 0, Failures: 0, Skips: 0 but if I will try to run the test class directly then test will run. ...
0
votes
0answers
26 views

How to use setUp in selenium?

I want to use setUp instead of setUpClass in my selenium tests. This code works fine and is able to get the correct host when using setUpClass: @tag('selenium') @override_settings(ALLOWED_HOSTS=['*']) ...
0
votes
2answers
270 views

Issue in Selenium script execution using .bat

I am trying to run a selenium script via .bat file. But I am getting failure in CMD. The script runs fine when ran via eclipse ( test case runs properly as testng class and as testng suite). But when ...
-1
votes
2answers
149 views

NullPointerException on WebDriver using POM and Page Factory

I'm getting a NullPointerException on the Registration and BasePage classes for the driver variable. In BaseTest, I initialized the Webdriver with ChromeDriver and in the RegisterTest, it extends the ...
0
votes
0answers
182 views

downloaded pdf file in internal Shared storage in mobile android device

Here after downloading a file in chromebrowser in mobile I'm trying to check that filename is present in Internal shared storage downloads folder in mobile but it is showing null exception. How to ...
-2
votes
1answer
49 views

Performance Testing: Flag when a UI/API test's runtime increases by x% (Selenium C# Azure)

Our team currently use Selenium and C# (and NUnit) to run UI Automated tests. All tests have been manually programmed, meaning no recorders have been used. Issue: We now have a request that these ...
-1
votes
1answer
102 views

Find element in multi layer pages for single website

Hello please I'm quite a selenium newbie and I would need help for my thesis data. I want to scrape this marketplace data https://www.tokopedia.com/search?st=shop&q=dapur but to get the data that ...
2
votes
2answers
935 views

Get class name of the calling class

I needed to get a class name from my calling class. I will not make too much confusion. I have 3 classes . Class A{ //do something } Class B extends Class A { @Test(dataProvider = "dp&...
1
vote
2answers
4k views

Find button class with Selenium on Python

Please I'm quite a selenium newbie and I really need help to get the data for my thesis. I scrapping the marketplace from this url https://www.tokopedia.com/sunxin I want to get the data from the ...
1
vote
1answer
143 views

Selenium Dataprovider returns a NegativeArrayException when called from different class

I have an excel which contains multiple worksheets in it. Each worksheet contains multiple columns. I have a class like this. public class dptwo extends dpone { @Test(dataProviderClass = testdp.class, ...
1
vote
1answer
45 views

Variable in Xpath is not working

#driver.find_element_by_xpath('//div[@id="groups"]/div/div/div/div/div[2]/div[1]/div/div/button').click() i = 5 gPath1 = str("\'//div[@id=\"groups\"]/div/div/div/div/div[2]/...
0
votes
2answers
337 views

Fixing an asynchronous JavaScript timeout out issue with Selenium in C#

Background I am running the following JavaScript code using the C# bindings for Selenium: async function addTableCellClassInjector(row, tableIndex, rowIndex) { for (let columnIndex = 0; column = ...
1
vote
1answer
843 views

How to handle this below window/pop up in chrome when i click on print link . I need to recognize it and click cancel on it

When I click on Print link in chrome browser , a pop is opened which shows it as a PDF file and then on the right side there are printing options with save , print etc buttons . Now when I click the ...
3
votes
2answers
57 views

Test class organization and naming in an MVC webapp

I'm a developer who is making his first attempts at using Selenium for automated UI testing. What is the best practice for creating and naming test classes in an MVC webapp? My webapp has a dozen ...
3
votes
1answer
100 views

Problem implicit wait with wait.until

In my code, I want to wait a certain time until the command fails with implicit wait for the driver. I have parts which were loaded after entering the page and a loading-icon is visible. In these ...
0
votes
0answers
30 views

How can I automate the email signup and verification process using selenium? [duplicate]

I have to automate the email signup and verification process using selenium. Any suggestion?Thanks in advance.
1
vote
1answer
267 views

What is the meaning of test runner? What is the meaning of test runner in layman terms? [closed]

What is the meaning of test runner? Protractor is a test runner. What is the meaning of test runner in layman terms?
3
votes
1answer
67 views

Unable to extract table content from webpage using selenium

I am trying to extract the tables generated by selecting "Branches", a city and a district from this site: https://www.acb.com.vn/wps/portal/en/atm So far, I have been able to write the code ...
1
vote
2answers
4k views

How to use proxy with authentification in Selenium with Chrome WebDriver?

After hours of research I am still not able to use a proxy with authentification (username, password) in selenium using chrome WebDriver. Here is what I tried: using a chrome extension -> not ...
1
vote
2answers
2k views

How to use Selenium to select an option from a React JS drop down with div tag/class?

I have tried all the possible things. also, tried searching over tried different combinations and variations. I can get the element clicked which opens the dropdown. but i am not able to select an ...
0
votes
1answer
541 views

How to get the Chrome Browser cookie file path when it is launched from selenium?

I am trying to scan the cookies of a specific page with selenium. Unfortunately, the get_cookies() method can only get the first-party cookies, but I am more interested in the 3rd party cookies. As ...
2
votes
3answers
369 views

How to pass excel column values into different test methods of a class in Java Selenium

I have an excel which contains 4 columns with N rows. Let us say Col1, Col2, Col3, Col4 are the headers. Now I have a java class and there are 3 methods inside it. public class test(){ @Test(...
0
votes
1answer
1k views

How to disable Chrome Automation Extension via Selenium (Java)

I have a requirement to disable the "chrome automation extension" while running my selenium scripts. Can someone suggest me an approach to disable this extension using Selenium. [ Note: I ...
0
votes
1answer
75 views

NullPointerException - how to fix it?

I am getting this error in those 2 classes: at pages.actions.HomePageActions.searchProduct(HomePageActions.java:30) at testcases.StandardProductPricingTest.standardProductPricingTest(...
1
vote
1answer
169 views

Selenium Extent Reporting Problem

I cannot figure out the problem. After the picture, another problem is here. htmlReporter.config() is not working and I'm not able to fix it. This is my dependency: <dependency> <groupId>...
2
votes
1answer
232 views

Using loop how to get dataframe from each next pages and store table values using Selenium Python

https://seffaflik.epias.com.tr/transparency/tuketim/gerceklesen-tuketim/gercek-zamanli-tuketim.xhtml from the above website, I've achieved to enter date picker for two date range and then clicking &...
1
vote
1answer
1k views

Using sendkeys multiple times to scroll down

I am trying to scroll down a drop-down menu, but since scrolling with a mouse will just scroll the page instead of the drop-down, I thought of using sendkeys by sending DOWN_ARROW multiple times. ...
0
votes
1answer
583 views

How to get WebDriver Instance(Object) from Hooks(@Before) for parallel executions of scenarios

I want to get WebDriver Instance(Object) from the Hooks Class in @Before Annotation setup() method. And I want to do it in such a way that I am able to run my scenarios in parallel. I know what are ...
0
votes
1answer
948 views

Selenium thinks button is clickable even when disabled

I'm having an issue where Selenium is saying a button is clickable even when it's disabled. I'm using Selenium with a website where you have to select a date first and then time slot from a dropdown ...
0
votes
1answer
33 views

How do I write a better xpath of this element? [duplicate]

I am working on a project and building automation test suite for a webpage. A certain part of the webpage looks like this. The corresponding HTML is as follows: <p class="customer-service&...
0
votes
0answers
86 views

Selenium drop down menu can't locate 11th element

Trying to scrape data from https://www.sgx.com/research-education/securities and the code below works but only for the first 10 iterations after which it throws a NoSuchElement Exception. Starting ...
1
vote
3answers
194 views

Why does Google Chrome initiated through Selenium shows less attributes for anchor tags compared to normal Chrome session?

I'm trying to scrape some image href attributes from the <a> tags from a Google search using Selenium, ChromeDriver and Chrome. When the url is accessed manually I'm able to locate the required ...
0
votes
2answers
39 views

UI amounts and conversions to numbers/strings

I have a number of UI-visible amounts which I am comparing with what I have prepared as a part ot my test cases - randomized&mocked test amounts are doubles. What is the usual best practice? ...
0
votes
1answer
1k views

Need help for passing arraylist in dataprovider

I am taking values from excel and than saving values in String type. Created object array and passed those values. added Object array to ArrayList. When using it as dataprovider it is giving me erros. ...
0
votes
1answer
43 views

Page Object - direct driver.findElement on exact xpath vs. chaining locator via a wrapper

I have a Page Object with two ways of finding the same DOM element: First there's a wrapper for finding the parent transactionsTable, then on this wrapper I call another findElement with the rest of ...
0
votes
1answer
259 views

Can Robot Framework framework iterate over example data?

The BDD sample below is written using Katalon Studio Scenario Outline: Verify Price of <plan> Plan Given <accountType> account is currently logged in When User navigates to Publish ...
1
vote
1answer
362 views

Page object implementation for Winapp Driver

I am using Winapp Driver to control a windows desktop application using java. The automation runs fine but I am looking for a way to implement the Page object model. This is what I am using at the ...
0
votes
1answer
75 views

java.lang.NullPointerException in Page object Model

I have created this program using TestNG and i'm getting this error java.lan*g.NullPointerException I have initialized the Webelement .But still i'm getting error POM.java package TestPOM; import java....
-1
votes
1answer
3k views

How to configure path for file download in python-selenium

I have changed the path of file download from using below code. chromeOptions=Options() chromeOptions.add_experimental_option("prefs", {"download.default_directory": r"C:\...
0
votes
1answer
2k views

Get most recent downloaded file using python-Selenium

My Python-Selenium script is downloading the particular file but the file is taking long time to start and get completed downloaded. It starts after clicking in 25/30 seconds and completed in 50/55/60 ...
2
votes
1answer
59 views

Selenium WebDriver - Unable to identify if radio option is selected or not - contains pseudo elements

I am having hard time with identifying if radio option No is selected or not using Selenium Java. Below is the screenshot of the radio options on the web page. A workable solution is much appreciated. ...
-3
votes
1answer
114 views

Why do we create parameterized constructor in every PageObject class which accepts one driver reference when BaseTest has a global driver object? [duplicate]

When every test class will inherit driver, then why should we create constructor that takes driver object? public class BaseTest{ public static Webdriver driver = new ChromeDriver(); } public class ...
0
votes
1answer
75 views

I want to enter text in search text box and click search icon or enter [duplicate]

I am facing the issue . Kindly assist. The HTML Code snippet is attached I am getting the error as Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: ...

1
4 5
6
7 8
96