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
4
votes
2answers
684 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 ...
2
votes
3answers
279 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
264 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
179 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, ...
1
vote
2answers
63 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
3answers
2k 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
1answer
62 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
497 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
193 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
40 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, ...
30
votes
8answers
13k 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
89 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
38 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
34 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
34 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
1k 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
353 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
315 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
100 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
572 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
289 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
113 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
665 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='...
6
votes
5answers
7k views

How to connect Selenium to an existing browser that was opened manually in java or create semi automated tests?

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
259 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
186 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
3answers
594 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
201 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
471 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
458 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 ...
11
votes
6answers
8k 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
41 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
290 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
156 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
2k 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
81 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
95 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
120 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
218 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
2k 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
57 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 (...
0
votes
2answers
86 views

How to validate a successful file download test senario from selenium [duplicate]

I need to automate the following test senario where when I click on a button, a file will be downloaded There will be no message box and no text message. How should I implement this scenario ...
0
votes
3answers
60 views

Can some one please suggest a proper CSS name to find this element

I need to click on the above button just using CSSSelector . I have tried with ; > IWebElement el4m = > Driver.FindElement(By.CssSelector("input[type='button'][contain='Search']")); > ...
0
votes
1answer
388 views

How to generate report using extent reports in Page Object Model in C#

I have created a POM framework using NUnit in C#. I have created Reporting.cs file which creates reports for the test in that class. How I can generate reports for all tests in different classes ...
1
vote
1answer
684 views

How to select a dropdown value in Selenium WebDriver using Java appium?

I am new to Selenium, currently am working on selenium webdriver. I want to select a value from the drop-down. But I am not able to do it because of some error. Also, I want to inform you that in my ...
0
votes
4answers
246 views

Not able to find the unique xpath for an element in expedia.com using Selenium

I am trying to find the unique xpath for elements in the "travelers" pop option in the home page of expedia.com When I give the following xpath "//div[contains(@class,'gcw-menu')]/div/div1/div2/div[4]...
0
votes
1answer
264 views

How to read Text in a Tradingview Alert with Python and Selenium

After a very useful help here to login on trading view, i cannot figure out how to access to the text of this following alert and close it selecting OK here is the html code corresponding to that pop ...
0
votes
1answer
32 views

How to find path to filtervalue

Can you help me how to find a path to desired "filtervalue", such as value "Search in active documents"? As you can see in the picture, the class filtervalue is there multiple times. Thank you in ...
1
vote
1answer
545 views

how to get the window title name when its open in new window with document file

Scenario: after click on PDF buttton > new window open with document. Issue: when i used getTitle , its returned the previous page title Question : is it because the PDF page opens its not normal ...
1
vote
1answer
437 views

Automating a desktop app based on Chromium Embedded Framework using Selenium

Background: At work we are passing the --remote-debugging-port=9555 parameter to a CEF based desktop app and launching it using Runtime.getRuntime.exec("path to app"). Then, using selenium, we open an ...

1
6 7
8
9 10
93