Questions tagged [selenium]

26092 questions
1

votes
0

answer
37

Views

How to run a timer on multiple selenium windows? (Selenium Java)

The goal of my program is it to open two firefoxdriver windows and have them both click a button at a certain time (11am for example) How can I achieve this? This is what I have so far, but it doesnt work and I'm not sure how to fix it. public class Timetest { public static void main(String[] args)...
hypecode
1

votes
0

answer
495

Views

Timeout trying to use Chrome Headless Browser print-to-pdf with Selenium WebDriver C#

I'm trying to create a ChromeDriver object using the ChromeOptions that will print the screen to a p.pdf. If I run the following command I'll get that: 'C:\Program Files (x86)\Google\Chrome\Application\chrome' --headless --enable-logging --disable-gpu --print-to-pdf=C:\Users\Me\Documents\google.pdf...
user2961759
1

votes
1

answer
170

Views

Changing an inspect element with selenium java/JavaScript console?

I'm trying to use the selenium chrome driver on Java and part of my script requires me to edit a google chrome element of a website. How can I modify the value of this element using java? I figured out I'm supposed to use this code: JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScri...
Blake W
1

votes
0

answer
881

Views

Generating id's for React components for Selenium tests

I'd like to generate id's for almost every element in my website, to have an easier time handling elements for Selenium tests. Is this a good approach? My application changes quite a bit. I can't seem to add the id HTML attribute to the React component, because React interprets it as props e.g. ......
Patryk Janik
1

votes
0

answer
80

Views

Using docker Selenium node not accessable from my computer

Using Docker I run Selenium Hub and create two more container and register note. This is the logs 07:25:08.215 INFO - Will listen on 4444 2017-12-28 07:25:08.252:INFO:osjs.Server:main: jetty-9.4.7.v20170914 2017-12-28 07:25:08.273:INFO:osjs.session:main: DefaultSessionIdManager workerName=node0 2017...
zsbappa
1

votes
1

answer
165

Views

Should selenium tests be kept in separate project

I have a Java web app (Maven) where I have some Selenium tests.The testing framework is Junit 4.x. I'm also using Jenkins for CI. Right now all my tests (integration + selenium) are kept under the src/test folder of the project.(classic maven structure) Due to the fact that Jenkins cannot run se...
Videanu Adrian
1

votes
2

answer
409

Views

click on a <a> tag with selenium c#

I am trying to click on a tag but when I am trying to access it by ID i got an error that says Unable to locate element. I am using selenium c# in unit test project. the code to make the click is the followining: IWebdriver.FindElement(By.Id('BUTTON_OPEN_SAVE_btn0_acButton')).Click(); and tag cod...
user6336440
1

votes
0

answer
136

Views

localStorage access from firefox extension scope

I have a Selenium program running Chrome/Firefox web drivers with my extension on each browser. The extension is generic and each time the program runs it loads different config to the extension using localStorage. The flow is: Start the web driver with the extension installed. Navigate to a web pag...
Adi Ohana
1

votes
1

answer
265

Views

can't download .XLS file from url using selenium python. Always end up with Firefox download popup

I have tried various methods but I'm unable to download excel file. I always end up with the firefox popup staring at me. any Idea how to get this working import time from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By fr...
Rahul Mishra
1

votes
1

answer
183

Views

How to solve StaleElementReferenceException error

I am doing the automated testing using visual studio. While getting the inner element value it's showing this error. It's not showing this error all the time but sometimes it's successfully tested. OpenQA.Selenium.StaleElementReferenceException occurred HResult=0x80131500 Message=stale element refer...
Mutu Arron
1

votes
2

answer
125

Views

How to write Selenium Java Application code in IDE through main() and TestNG

I m facing the below issue searched in Google couldn't find the clear answer how to resolve this. Error : org.apache.bcel.verifier.exc.AssertionViolatedException.main(AssertionViolatedException.java:102) Code import org.openqa.selenium.chrome.ChromeDriver; public class Newtours { public static C...
Fouziya Hanif
1

votes
0

answer
238

Views

Geckodriver error when script runs from cronjob

I have python script which run absolutly fine when we execute it manually. However when we schedule it to run from cronjob it fails with driver = webdriver.Firefox(firefox_profile=profile) File '/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/webdriver.py', line 148, in __init__ s...
Jaydeep Chaudhari
1

votes
3

answer
1.1k

Views

Selenium C# sendkey

Hello Stackoverflow Users! On many internet sites, there are some scrollable div containers. For example on facebook, if you click on any event and would like to know who is taking part in this event. You click on the button, it opens a list and you can see all the people. Another example, if you v...
Paski7
1

votes
0

answer
111

Views

Having difficulty using SoapUITestCaseRunner in Selenium

Let's get straight to the point: I'm from QTP/UFT background. My company is transitioning from UFT to Selenium. We've got Ready API couple of months ago and now I have couple of test cases in ready api. When we run the entire regression suite, we'll have to run the soapui testcases as well as part o...
Sharif Mia
1

votes
0

answer
229

Views

The Selenium Firefox WebDriver does not start the installed extension

I have: Selenium Firefox WebDriver v.3.8.1 Browser Firefox 43 XPI-file with firefox add-on I ran the extension in the browser in two ways: jpm and using the program on the java through selenium firefox web-driver. In the first case, I run command jpm run, which creates a new profile with the exte...
bva
0

votes
2

answer
15

Views

How can I close the current driver tab if xpath is NOT found?

If a specific XPath is NOT present, I need python to close the tab. What can I do? I'm using Python + Selenium with Chrome.
thatpoppy fan
1

votes
0

answer
68

Views

How to use Selenium web browser to post in salesforce

My friend recommended Kantu for work automation hence I'm trying it out but couldn't seem to find the answer to my question on the web. I'm new at coding, automation, stackoverflow and this is my first post. Have just installed Kantu for Chrome- Selenium IDE Light and am trying to automate a daily p...
user9158446
1

votes
2

answer
403

Views

How to find and click on HTML image element

I'm new with Selenium and struggle with this one for few hours. I have an HTML page that contains icon and stream view (both images), the browser view is on 100% and I would like to modify it and make it smaller, it can be done by changing browser zoom, modifying CSS property or clicking on the ima...
Tzahi Kadosh
1

votes
2

answer
346

Views

How to make the “it” in mocha to wait until the promise within “it” gets resolved?

var promise = require('promise'); var {Builder, By, Key, until} = require('selenium-webdriver'); var test = require('selenium-webdriver/testing'); var chai = require('chai'); var getUrl = require('./wdio.conf.js'); var driver = new Builder().forBrowser('chrome').build(); test.describe('Proper Testin...
Pawan Juyal
1

votes
0

answer
59

Views

Scrapping the data from website under the map by using python Selinium

I got a requirement to pull all the URLs from a webpage and data from the map if there is a map in the webpage. I was able to get all the urls from the webpage by using Python Selinum but not able to get the data under the map. This is the sample URL. In google, I searched for 'tool rental' and go...
KeepLearn
1

votes
1

answer
336

Views

Selenium grid Run to docker container

I've Installed Docker o my Computer and ran the following command [email protected]:~# docker run -d -p 4446:4444 --name selenium-hub selenium/hub & docker run -d -P -e no_proxy=localhost -e HUB_ENV_no_proxy=localhost --link selenium-hub:hub selenium/node-firefox-debug Then I view Logs on Hub 10...
zsbappa
1

votes
0

answer
381

Views

chromedriver disable log statements

I am using chrome driver version 2.33.506120 When I run the tests I see the logs like this : Starting ChromeDriver 2.33.506120 (e3e53437346286c0bc2d2dc9aa4915ba81d9023f) on port 21961 Only local connections are allowed. Jan 03, 2018 11:25:37 AM org.openqa.selenium.remote.ProtocolHandshake createSes...
vikas
1

votes
0

answer
347

Views

Chrome driver not working headlessly with Python and Selenium

I am new to Selenium programming with Python. I am trying to use the switch_to.frame() and other driver functions after opening a URL. The code works fine without the --headless argument, but does not execute at all when I try to run it headlessly. Could someone help me out with it? The URLs I am tr...
Eetnawa
1

votes
2

answer
197

Views

How to handle back to back alerts on selenium webdriver automation

Scenario: On Perform Click -> Alert1 is displayed On Accept Alert1 -> Alert2 is displayed I am able to accept alert1 but when I write code to handle alert2 also then None of alerts are accepted. Tried different from Google but nothing works Different combination with thread.sleep and wait etc but no...
pratap88bhanu
1

votes
1

answer
122

Views

How to iterate for each loop for duplicate values

What I expect to happen: The program should find the expected Web Element from the list, click on it, find the contract id and match with the given contract id. If yes, break the loop else click back button and proceed until the conditions are satisfied. Actual issue : On running this for each loop;...
srini lavanya
1

votes
1

answer
282

Views

Click on links in each row of a table

On a webpage there is a table, and each row has a link. I want to iterate thru the table and click on each link in the rows and open it in a different tab. This is the table, the first item in each row is a link: table = driver.find_element_by_xpath('xpathofthetable') for row in table.find_elements...
Dimple Mathew
1

votes
2

answer
274

Views

Why am I getting the previous tabs url?

I am trying to get the url of the window that is opened by clicking the element with id 'wrpr_1431108056877h'. The new window opens but getTitle() still returns the title of the original tab. On the video provided by Browserstack I am able to verify that the current tab is indeed the one that I am t...
Ivan Gonzalez
1

votes
1

answer
327

Views

Cannot find context with specified id with chromedriver

I'm having trouble running my automated tests. In this line: Wait.Until(ExpectedConditions.ElementExists(findElement)) 'findElement' is a element into a frame, and I'm the switch before the interacty. I'm think that problem is caused because de Google Chrome was update for the version 63.0.3239.10...
1

votes
1

answer
87

Views

Failing to automate ng2-dnd using selenium and java

Could you please help me in automating the drag and drop using selenium and java. http://akserg.github.io/ng2-webpack-demo/#/dnd The similar example we are using in our project but we drag and drop is not happening and we have tried in different ways to find the solution but no use. If anyone of you...
Saikumar Jalda
1

votes
1

answer
196

Views

How to test our chrome extention with selenium tool?

I built a Chrome-extension, and I would like to make an automatic Selenium test, in order to test it. This is the code I wrote in java: public static void main(String[] args) throws InterruptedException { WebDriver Driver = null; System.setProperty('webdriver.chrome.driver','chromedriver.exe'); Driv...
Sivan Mednyk
1

votes
1

answer
296

Views

protractor hanging on element click

I've got an angular 5.x project. I'm trying to execute some e2e tests with Protractor. I've got a few simple tests running that simply check the browser title and check for the presence of basic elements. I'm now trying to do more complex tests where I interact with the page. Unfortunately clic...
BRass
1

votes
4

answer
102

Views

Can't click action link

I have a page with multiple rows that each have a link, 'Add Tenant Info' but I can't seem to click it in a way that would be unique to each row. I have been able to select take actions with driver.findElement(By.cssSelector('a[class*='sf-with-ul']')); Here is the HTML of the section: Tenant 1 Name...
FunTester123
1

votes
1

answer
48

Views

selenium issue: with selecting a value in dropdown using thymeleaf

I am facing an issue selecting a value inside a dropdown during a selenium test. I am getting my values from a properties file using thymeleaf in the following way. When I try to select a value in the dropdown, selenium is not able to do that. Instead of getting the dropdown values from properties...
anand
1

votes
0

answer
271

Views

Running selenium grid hub with https protocol

I am running selenium grid in a secured private network. I want to receive request to hub in https protocol instead of http. Simply, Grid console: https://X.XX.XX.X:4444/grid/console Grid : https://X.XX.XX.X:4444/wd/hub I got to know about Ngnix server for receiving side and serve the request to h...
djavvadi
1

votes
2

answer
390

Views

Selenium C# DefaultWait IgnoreExceptionTypes does not work

I'm using DefaultWait while waiting for an WebElement to be clickable. Although TargetInvocationException is one of the exceptions in my list of exceptions to be ingnored during waiting, I still have tests failing with this exception before TimeOut period is reached. This is not what I expected. pub...
Frank
1

votes
0

answer
212

Views

Protractor Map or Filter function on a table which is having repeater with inside div elements

Below is the html for a table with repeater> div> a> span. How I can work with filter or Map function to get the compare the second column value i.e idea = ideaOne + ideaTwo + ideaThree + ideaFour along with first column value in loop as this is an anchor tag. Also what would be the proper way to d...
tyaga001
1

votes
0

answer
38

Views

No such element even use explicit wait

I'm using selenium with ChromeDriver to crawl images. To speed up the progress, I execute javascript window.stop() to stop loading the whole page as soon as the elements of interest are loaded. I ran the same code several times but get different outcomes (sometimes the NoSuchElementException occurre...
Nguyễn Tài Long
1

votes
1

answer
78

Views

Python Selenium - How to terminate unsuccessfully spawned Chromedriver?

The following line of code is executed in my Python script: driver = webdriver.Chrome(CHROMEDRIVER_PATH, chrome_options = chrome_options) This line may either fail or succeed, depending on apparently random conditions (It is due to an extension that is being loaded, but that is not relevant here). T...
user3257755
1

votes
1

answer
559

Views

python proxy in selenium firefox headless not working

I am using Ubuntu Server 17.04. I am trying to set my proxy into selenium. But it's not working. I am using proxy from https://stormproxies.com/. Basically only the ip i allowed it will be allowed to have proxy and then i have to use the ip that they give me to access it. So basically it's not anyth...
Omega
1

votes
0

answer
129

Views

Python selenium: Need help in selection using ActionChains

How to select these 2 devices using ActionChains? Click and hold some place near B1 and dragging the selection till some offset after B2 to select B1 and B2. Need to select 2 devices BL1 and BL2. Xpath for them: BL1: dropdown = driver.find_element_by_xpath( './/*[@class='n9k healthscore90 sb-node']...
Tim

View additional questions