selenium-webdriver

ChromeDriver does not exist in Selenium WebDriver C# test script

怎甘沉沦 提交于 2021-02-05 18:00:55
问题 I have come across a few people with the same issue that seemed to have solved the problem with System.addProperty("webdriver.chrome.driver", ".../chromedriver.exe"); before instantiating the driver. I have had little luck with this and am still getting the error that the file .../bin/Debug/chromedriver.exe does not exist. Has anyone had any luck getting this to run without putting it in the bin folder? Example code: System.Environment.SetEnvironmentVariable("webdriver.chrome.driver", @"c:

ChromeDriver does not exist in Selenium WebDriver C# test script

纵然是瞬间 提交于 2021-02-05 17:51:08
问题 I have come across a few people with the same issue that seemed to have solved the problem with System.addProperty("webdriver.chrome.driver", ".../chromedriver.exe"); before instantiating the driver. I have had little luck with this and am still getting the error that the file .../bin/Debug/chromedriver.exe does not exist. Has anyone had any luck getting this to run without putting it in the bin folder? Example code: System.Environment.SetEnvironmentVariable("webdriver.chrome.driver", @"c:

what are the differences (and when to use) selenium-webdriver over webdriverjs?

倾然丶 夕夏残阳落幕 提交于 2021-02-05 13:57:36
问题 I'm an experience professional that uses selenium-webdriver. I'm exploring more options on how to test javascript applications and I found webdriverJs. Unfortunately, I dont understand what's the difference between these two (2). Can someone please explain when to use selenium-webdriver over webdriverJs and the benefits? Thanks! 回答1: WebDriverJS and selenium-webdriver are both JavaScript bindings for the Webdriver API. The only difference is that selenium-webdriver is the official

what are the differences (and when to use) selenium-webdriver over webdriverjs?

徘徊边缘 提交于 2021-02-05 13:54:24
问题 I'm an experience professional that uses selenium-webdriver. I'm exploring more options on how to test javascript applications and I found webdriverJs. Unfortunately, I dont understand what's the difference between these two (2). Can someone please explain when to use selenium-webdriver over webdriverJs and the benefits? Thanks! 回答1: WebDriverJS and selenium-webdriver are both JavaScript bindings for the Webdriver API. The only difference is that selenium-webdriver is the official

Python Selenium - How can I click on the third last element from a group of elements in a table?

半世苍凉 提交于 2021-02-05 12:18:29
问题 Good day everyone, Can someone explain to me how I cant get the number of elements in a table? I am running through multiple tables that all have different lengths and I always need the 3rd last item. I have the xpath of the table that contains those . Using Selenium's Python API - How do I get the number of rows in a table? I found this answer and some other answers that seem to answer my question, but to be honest: At this point I just dont understand how to implement this into my code. I

How to replace innerHTML code using Selenium Webdriver C#?

Deadly 提交于 2021-02-05 12:13:05
问题 HTML CODE: <select name="ddlFruit" id="ddlFruit" class="Searchddl"> <option value="">Select</option> <option value="447">Grapes</option> <option value="448">Mango</option> <option selected="selected" value="449">Apple</option> </select> How can i replace selected="selected" to other options using selenium webdriver. Eg: <select name="ddlFruit" id="ddlFruit" class="Searchddl"> <option value="">Select</option> <option selected="selected" value="447">Grapes</option> <option value="448">Mango<

Alert is not displayed

狂风中的少年 提交于 2021-02-05 11:34:47
问题 My test checks whether the user can log in to the site. I wrote a code to alert that works but showing parts in catch . I tried to write alert without try and catch but displays an error. How to write alert without try and catch and alert to be displayed(test to pass). org.openqa.selenium.TimeoutException: Expected condition failed: waiting for alert to be present (tried for 5 second(s) with 500 MILLISECONDS interval) This is my code: public void getMessage() { //Verify that is message

Can you help me use Selenium to click Add To Cart button?

柔情痞子 提交于 2021-02-05 09:26:57
问题 I am trying to do a tutorial and learn Selenium in python however i cant seem to get Selenium to click the "Add To Cart" button using either find_element_by_class or find_element_by_XPATH. The problem is to check if the item is out of stock, and if it is out of stock then to refresh the webpage and restart the script. If the item is in stock then it should click "Add To Cart" I am using: Python v3.9 Chrome v87 This is the URL i am practicing on: https://www.currys.co.uk/gbuk/tv-and-home

Fullscreen in Headless Chrome using Selenium [duplicate]

扶醉桌前 提交于 2021-02-05 09:26:18
问题 This question already has answers here : How to set window-size to fullscreen for headless-chrome using chrome options? (3 answers) Closed 3 months ago . I have a number of tests in an E2E suite where a video element is fullscreened and the fullscreen status is verified. However, when running the suite headlessly, these tests fail. Screenshots of the page show the video is simply not in fullscreen, even after the fullscreen button is clicked. Is there a way to achieve fullscreen functionality

How to switch window handles using Selenium and Python

醉酒当歌 提交于 2021-02-05 08:56:33
问题 If you click a link in a Windows program other than a web browser, a pop-up window appears. I want to get the url of this popup window. Pop-up windows will only open in IE. driver = webdriver.Ie('C://Users/aaa/IEDriverServer.exe') driver.implicitly_wait(3) pyautogui.moveTo(1576, 660) pyautogui.click() time.sleep(3) driver.switch_to_window(driver.window_handles[1]) # error =>driver.switch_to_window(driver.window_handles[1]) # IndexError: list index out of range driver.get_window_position