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
-1
votes
2answers
27 views

Using existing framework for new PoM framework bad practice?

So I am implementing my own Page Object Model framework for a web application. It's my first time writing my own framework but I think I for the most part understand how I need to write it. The ...
0
votes
1answer
24 views

NullPointerException error in POM code

Setup Class public class Setup { private static AndroidDriver driver = initializeAppiumServer(); public static AndroidDriver initializeAppiumServer() { if (driver == null || ...
-1
votes
1answer
28 views

Object is not recognizing through webdriver

List val=driver.findElements(By.xpath("//div[@class='ui basic button floating item dropdown']//div//a")); is not identifying through webdriver. But this xpath perfectly recognizing at chrome browser.
0
votes
2answers
19 views

“chrome.window.onRemoved.addListener()” does not executes when webdriver.quit() is executed in Selenium with Python

I want to perform logic on chrome.window.onRemoved.addListener(), it works exactly in chrome browser development environment and in selenium when performed with browser UI of selenium test, but when I ...
0
votes
0answers
13 views

Is there is way to integrate a selenium testng script + spring mvc or servlet

We have created a UI page and user will give response. That response should trigger a selenum testng script.
10
votes
7answers
2k views

What is Test Automation Framework?

I am a complete beginner in Test Automation and could not find a good answer on the web. Some automation engineers use an underlying automation framework as a jar dependency in their selenium web ...
0
votes
2answers
53 views

How to add an argument to my BaseTest ChromeDriver Instance?

I have a selenium framework with a BaseTest class. In the BaseTest class we instantiate a ChromeDriver instance which contains various arguments. These are part of the @BeforeMethod (using TestNG). My ...
4
votes
2answers
42 views

How to restart browser in protractor-cucumber framework or protractor-jasmine

I am using protractor-cucumber-framework, but when I try to restart I get This driver instance does not have a valid session ID (did you call WebDriver.quit()?) and may no longer be used. I ...
0
votes
1answer
36 views

python+selenium+Unittest: get website cookie/manipulate cookie/send back. Possible?

Details: For our test procedures, we want to read the cookies of a website, manipulate the cookie and read it again. We want to test if this is possible at all to avoid a security gap. We use for ...
0
votes
1answer
25 views

How to assert web element is non editable selenium c#

Depending on a condition a input or a div gets render on browser. In my UI automation test I need to assert the div is a non-editable element. I achieved this as- var readOnlyLocation = Driver....
2
votes
1answer
30 views

Selenium with Ruby: Script not finding options in a drop-down

This is my first post, so if I have missed any info that should be included, please let me know. I am self-learning selenium/ruby automation in my spare time with only a little programming background, ...
0
votes
1answer
40 views

What is the approach to create a framework that should handle both Web and mobile app automation cases

I have an application which has web and mobile app (hybrid). Test cases are same for both but locators and actions are different. I would like to create a single automation framework that can handle ...
2
votes
2answers
201 views

How to automate Microsoft two-way authentication based login page in Selenium using C#?

In an application user needs to enter email id and password on a Microsoft login page. After clicking on the Log in button, it sends a sms to a mobile number. Now User has to enter the OTP to login in ...
-3
votes
0answers
25 views

selenuim WebDriver upload image [duplicate]

i'm trying to upload image to facebook using selenium WebDriver and all my attempts failing. is anyone can help with this? the HTML of the upload photo button is: div class="_3jk"> input aria-...
3
votes
1answer
51 views

Make an if/then statement utilizing a non present element

I'm using Python and I came across one problem. I'm trying to make a bot using selenium, and it's coming along nicely but I'm trying to use a non-present element to activate a function and I just can'...
1
vote
1answer
60 views

Facebook upload a picture using selenium webdriver

Using Selenium WebDriver I'm not able to click on add picture/video to a group in Facebook. i tried driver.findElement(By.xpath("//*[@aria-label='הוסף תמונה או סרטון']")).click(); but it does ...
0
votes
0answers
47 views

Selenium Webdriver not working with ng-click='logout()' (used at least 6 different xPaths)

I have the following code: <span class="login-link control" ng-switch="loggedIn()"> <!-- ngSwitchWhen: true --> <a class="site-control ng-binding ng-scope" ng-...
1
vote
1answer
23 views

How to jump between two different elements located same level?

In the google chrome inspector console enter the xpath: $x("/html/body/div/div/footer/md-toolbar/div/div[2]/img[2]/../../../../../../..//*[@id='input_15']") the console returns the element, ...
22
votes
7answers
10k views

How can Internet Explorer 5 be emulated in 2020?

Details One of our customers uses a rather old software solution, and this is still based (yes, it's unbelievable!) on Internet Explorer 5, and the customer still uses IE 11 in compatibility mode. ...
1
vote
2answers
49 views

Can some one help me to find the CSS selector for highlighted item

Could someone help me to identify the correct csslocator for the second span element in the below image: I tried the below locators but was not able to succeed, is there anything wrong with the ...
0
votes
0answers
36 views

unable to select a value from drop down

I am unable to select a value from drop down while automating UI of a website public void setTargetPortalDropdownOptionInModalPopUp(String visibleText) { Select select = new Select(...
-1
votes
3answers
29 views

How to use Click after getting text of an autogenerated time stamp

Using Java/Selenium and Page Objects, I have to create an item name that is auto generated using the current date and time and entered into a text field. I then have to verify that this item was ...
2
votes
1answer
26 views

ChromeDriver FlashPolicyHelper does not work remotely

We're using the new FlashPolicyHelper(driver).addSite("https://your.site") In order to bypass the getFlash prompt when trying to navigate to our websites that use Flash. However this does not ...
0
votes
1answer
58 views

Multi-factor authentication - Selenium automation

My company uses Multi-factor authentication to restrict access to some sites. Is it possible to copy user profile from firefox and use it in my new window?
-1
votes
2answers
43 views

How to add elements in list from a dropdown using Selenium/Python

I want to add all the city names in a list, so that I can compare then in assert is not in unit test.
0
votes
5answers
186 views

Element not found in a runtime

I am encountering a very unusual thing, the one I haven't seen before. There is one element I needed to find for testing purposes, it is visible on the page and I can find its unique relative XPath ...
1
vote
0answers
23 views

Sort rows in a dragable table by order selenium python

I have a html Link to html http://threedonthemap.s3-website.ap-south-1.amazonaws.com/ <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name=...
0
votes
0answers
22 views

How to resolve “Cannot find class in classpath: com.AES.Loginpage” error in Selenium?

I have created one java project and written a script for login to application using TestNG class. I got an error: "Cannot find class in classpath: com.AES.Loginpage" I have added jars and driver exe ...
2
votes
1answer
39 views

how to handle firefox download popup in selenium

Code: case "firefox": FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("browser.download.dir", "Downloads"); // folder profile.setPreference("...
0
votes
3answers
76 views

Selenium un-enable to find element

I have been through every selenium related page on here but not much else I can really try. I am trying to click on the text link but It gives me 'org.openqa.selenium.WebDriverException: chrome not ...
0
votes
1answer
47 views

Appium Inspector find element with the path but appium for java doesn't

I'm testing a mobile app using appium + selenium + java I have an element that I'm trying to find (in order to click on later) by using an xpath. Here is the xpath: //android.widget.TextView[@text='...
5
votes
6answers
406 views

How to connect Selenium to an existing browser that was opened manually in java?

I want to achieve some use cases in which: I want to perform some tasks that require manual intervention before kicking in automation execution. For instance, I need to manually launch the browser, ...
2
votes
2answers
35 views

How to solve Null Pointer Exception for below Selenium WebDriver POM Project

TestBase.java public class TestBase { public static WebDriver driver; public static Properties prop; public TestBase() { public static void intialization() { String ...
0
votes
1answer
51 views

Click function is not triggering even after button is clicked using htmlunit driver

I am able to click submit button and submit button click is working fine but text entered to add comments is not showing (basically submit button click is working ,but submit button functionality is ...
-1
votes
0answers
23 views

Selenium python - Fail assert using assert_equal by nose

I will try to compare web's tititle using nose framework with behave, i'm using the next code @step('I navigate to the Selenium Easy Demo Home page') def step_impl(context): context....
-1
votes
3answers
53 views

Retrieving an XPath Text from a Web Element [closed]

I have a task where I need to retrieve the following text in black color highlighted in yellow. It is not within any tags and has no attribute. Once you locate a web element through the Inspect option,...
-1
votes
2answers
48 views

Getting java.lang.NullPointerException while trying to instantiate the Webdriver driver under @ Annotation

Please find the code below and let me know why am I getting NullPointer. I am having no clue. package com.seleniumhybridframework.utility; import java.util.concurrent.TimeUnit; import org.openqa....
0
votes
0answers
44 views

org.openqa.selenium.ElementNotInteractableException: element not interactable

public static void month(WebDriver driver) { driver.findElement(By.xpath("//label[text()='Onward Date']")).click(); while(!driver.findElement(By.className("monthTitle")).getText().contains("...
3
votes
1answer
64 views

How to resolve NullPointerException error while implementing POM with cucumber framework

I am getting java.lang.NullPointerException while executing my test case, I am using Page Object Modle with cucumber framework in my maven project, following are the code snippets BoxJunitScript.java ...
4
votes
3answers
111 views

How to autoupdate Chrome-driver in Selenium?

Every now and then when the Chrome is updated, the existing chrome driver used in the script becomes invalid and the below error message is displayed: selenium.common.exceptions....
0
votes
1answer
28 views

Having trouble scraping data from website with Selenium

I've tried a couple different routes to get this to work but I've had no luck. 1) driver= webdriver.PhantomJS(executable_path=r'C:\Users\x\Downloads\phantomjs-2.1.1-windows\phantomjs-2.1.1-windows\...
3
votes
2answers
46 views

Struggling with Selenium in python 'is not clickable at point (x, y)' exceptions during testing

There is a website I'm testing on that puts up a gray loading div when the site is processing. The problem is that the div is there immediately at the website load and the only way you can tell it's ...
1
vote
0answers
65 views

How to automate Handsontable using Selenium WebDriver (Java)

I want to automate the Handontable using Selenium WebDriver using Java. Basically, I want to enter data in the handontable using selenium(Java). Is there any way available to enter data in the table. ...
10
votes
4answers
578 views

How to analyse 'Element not Found' exceptions when working with Selenium

When you are writing Selenium/WebDriver automation scripts you will probably run into the exception NoSuchElementException. You think your selector is working, but somehow the element cannot be found. ...
3
votes
2answers
64 views

Java Selenium click checkbox [duplicate]

I can’t get selenium to click on this checkbox button no matter what I do. Error: no such element: Unable to locate element: I have used sleep thread timers and wait.until(ExpectedConditions....
0
votes
2answers
65 views

Waiting for spinner to disappear does not work

I'm using the code below, waiting for "Loading" spinner to disappear. But I noticed that next test step does not wait until the spinner to disappear. Example: click on button_1 (after click, spinner ...
1
vote
1answer
47 views

Selenium-webdriver - how to pass a value in “TO” field

I am trying to send email from rediffmail, but it failed to pass values in the "TO" field. Here is my code: System.setProperty("webdriver.chrome.driver", "F:\\chromedriver.exe"); ChromeDriver ...
0
votes
1answer
64 views

Katalon - how to make an embedded test case data-driven?

Hello I need to login to an app and then make a product selection, with several different products (as a data driven script). The login script & product selection script will be used by other test ...
3
votes
1answer
317 views

Exception in thread “main” java.lang.AssertionError: expected [3] but found [3]

System.setProperty("webdriver.chrome.driver", "C:\\Users\\srajendran\\Documents\\chromedriver.exe"); WebDriver driver=new ChromeDriver(); driver.get("http://qaclickacademy.com/practice.php"); ...
-2
votes
1answer
53 views

Automation Testing using selenium webDriver on a javaScript based application

I am having a JavaScript-based application to automate using Selenium WebDriver. Can I automate a Javascript based application using Java with Selenium WebDriver OR do I have to use protractor (...