Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Browsing all 97777 articles
Browse latest View live
↧

How do I handle a simple Alert using C# and Selenium?

This is my code, when it gets to Switchto().Alert() there is an error saying 'No such alert' driver.FindElement(By.XPath("(.//*[normalize-space(text()) and normalize-space(.)='Add...

View Article


Selenium doesn't pass agruments when opening chrome

I'm using this code in order to "make" selenium-chrome to use my custom profile.options = webdriver.ChromeOptions() options.add_argument('--user-data-dir=C:\Users\imm\AppData\Local\Google\Chrome\User...

View Article


Python Selenium Chrome turn off the headless option while running

I'm using Selenium in Python. And I'm opening the WebBrowser with Chrome. I've added the option "headless" to the WebBrowser so it won't show it on the screen. But I want at some point to show the...

View Article

Browser.close() with a loop to open a new window

I'm looking for help to run a loop with selenium. I want to open a main page, then open a window when clicking on a link, then swith to the new window, and close the new window to switch back to the...

View Article

Image may be NSFW.
Clik here to view.

selenium webdriver : How to click on particular button having classes applied...

Q. Same kind of class applied to all Download button,How to distinct them from each other? Let's say i want to click on 3rd number of download button. Find a xpath for that button. I have tried this...

View Article


Take screenshot of webelement in Selenium Python and save file

I am trying to take a screenshot of a particular webpage element based on class name. I have followed the methods described in How to take screenshot with Selenium WebDriver, How to screenshot a...

View Article

When I print the id it doesn't match the id in "inspect element"

I have a webpage with the following:<span class="plugin_pagetree_children_span plugin_pagetree_current" id="childrenspan173273808-0"> <a...

View Article

AttributeError: 'FirefoxProfile' object has no attribute 'update' error...

Hello Guys I'm having problem on my code.from selenium import webdriver import time profile = webdriver.FirefoxProfile() profile.set_preference('network.proxy_type',1)...

View Article


How to run Selenium tests in GitHub Actions

I'm trying to find the equivalent command to run Selenium tests in GitHub actions. In Azure DevOps, I'd use this YAML to run "Visual Studio Test":- task: VSTest@2 displayName: 'Run functional smoke...

View Article


How to check if URL contains something

I'm making a program which goes to a url, clicks a button, checks if the page gets forwarded and if it does saves that url to a file. However, after a couple of entries the page blocks you from doing...

View Article

Unable to click on element using Selenium

newbie here. I've been reading the site for a while as I'm still new to coding but hoping you can help. I've worked my way through some tutorials/worked examples on web scraping and am looking at the...

View Article

Repetitive Login Ban Issue (Selenium C#)

I am testing a complicated website and have to login every single time I want to test the required features. I got banned by the website last night and had to wait till the morning to work again. Do...

View Article

Selenium - How to find color of a pixel on canvas on X Y position?

I'm using selenium with python and I have a problem: I want to get pixel color of x y position on canvas.Does Selenium have some color picker or something similar?I tried get color of a pixel with...

View Article


How to wait for an item to finish loading?

Well, I'm testing on a page designed in Angular and Java with Selenium. When a query is made to the database or the page loads in its code this appears: <span _ngcontent-c0 class = "loading">...

View Article

Error initializing driver method - undefined local variable

In my test automation project, I am using ruby with capybara, cucumber and selenium. (I already have devkit installed and chrome is starting normally)When looking for an element in the site to select...

View Article


How to take full page screenshot using AShot library through Selenium and Java

I tried the below code for taking full page screenshot. But only the visible area is captured,public void Fullscreen (WebDriver driver) { try { final Screenshot screenshot = new...

View Article

driver.getScreenshotAs(OutputType.FILE) is not able to save all the...

I am using the below method for taking screenshots in my project: -public String getScreenShot(String imageName) { String snapShot = null; try { if (imageName.equals("")) { imageName = "blank"; }...

View Article


Where is getScreenshotAs method defined?

I was going through Screenshot code in selenium. Below is the code for it :File src = ((TakesScreenshot)driver).getScreenshotAs(OutputType.File); In the above line, TakesScreenshot is an interface and...

View Article

How to take screenshot of a newly loaded webpage

I am using selenium to login to a webpage and take a screenshot post login. Here is my code :import os from selenium import webdriver from selenium.webdriver.common.keys import Keys from...

View Article

Selenium WebDriver throwing TimoutException while invoking getScreenshotAs()

This is my code.public static void test1() throws IOException { System.setProperty("webdriver.chrome.driver", "data/chromedriver.exe"); drive = new ChromeDriver();...

View Article
Browsing all 97777 articles
Browse latest View live