selenium-webdriver

How can I save test case result in a variable whether it is passed or not after the test case execution is done?

浪尽此生 提交于 2020-04-06 17:38:21
问题 I am using selenium webdriver in visual studio Using NUNIT C#. The code of test case is public class MainProjectFile { private IWebDriver WDriver; private log4net.ILog Testlog; [TestInitialize] public void wd() { WDriver = Helper.GetWebDriver(helperconst.browserType.Chrome); Testlog = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); } [Priority(1)] [TestMethod] public void search() { Testlog.Info("Test ID:001, This test will select the criteria and update

Unable to upload a pdf file using send_keys or requests

好久不见. 提交于 2020-04-06 11:11:13
问题 I've written a script in python using selenium to log in to a website and then go on to the target page in order to upload a pdf file. The script can log in successfully but throws element not interactable error when it comes to upload the pdf file. This is the landing_page in which the script first clicks on the button right next to Your Profile and uses SIM.iqbal_123 and SShift_123 respectively to log in to that site and then uses this target_link to upload that file. To upload that file it

Unable to upload a pdf file using send_keys or requests

自作多情 提交于 2020-04-06 11:09:23
问题 I've written a script in python using selenium to log in to a website and then go on to the target page in order to upload a pdf file. The script can log in successfully but throws element not interactable error when it comes to upload the pdf file. This is the landing_page in which the script first clicks on the button right next to Your Profile and uses SIM.iqbal_123 and SShift_123 respectively to log in to that site and then uses this target_link to upload that file. To upload that file it

How to remove deprecation warning on timeout and polling in Selenium Java Client v3.11.0

我是研究僧i 提交于 2020-04-06 02:39:28
问题 Below is my code which is showing as deprecated after I have been updated the Selenium Webdriver version to 3.11.0. private Wait<WebDriver> mFluentWait(WebDriver pDriver) { Wait<WebDriver> gWait = new FluentWait<WebDriver>(pDriver).withTimeout(100, TimeUnit.SECONDS) .pollingEvery(600, TimeUnit.MILLISECONDS).ignoring(NoSuchElementException.class); return gWait; } Showing deprecated warning in withTimeout and pollingEvery section in the code. How can I rewrite this code so that I can remove the

Unable to launch Opera using Python Selenium

好久不见. 提交于 2020-04-03 10:53:28
问题 I am trying to launch opera using python selenium libraries. But getting capabilities error. Codes I have tried: Code1: driver = webdriver.Opera() driver.get('https://www.google.com') Code2: driver = webdriver.Opera(r'path to operadriver.exe') driver.get('https://www.google.com') Code3: options = Options() options.binary_location = r'C:\Opera\launcher.exe' driver = webdriver.Opera(options=options) driver.get('https://www.google.com') Output: Code1: selenium.common.exceptions

Unable to launch Opera using Python Selenium

旧时模样 提交于 2020-04-03 10:42:06
问题 I am trying to launch opera using python selenium libraries. But getting capabilities error. Codes I have tried: Code1: driver = webdriver.Opera() driver.get('https://www.google.com') Code2: driver = webdriver.Opera(r'path to operadriver.exe') driver.get('https://www.google.com') Code3: options = Options() options.binary_location = r'C:\Opera\launcher.exe' driver = webdriver.Opera(options=options) driver.get('https://www.google.com') Output: Code1: selenium.common.exceptions

Does Selenium Support automate to Desktop Applications

梦想与她 提交于 2020-03-28 07:03:22
问题 i want to use selenium to automate desktop application but desktop applications does not provide locators and elements X path,how can i locate elements in desktop application 回答1: No, Using selenium we can automate only web based application. Selenium doesn't provide any way to automate desktop applications. For automating desktop application we can use other tools such as AutoIT . Refer here for some idea->http://seleniumsimplified.com/2016/01/can-i-use-selenium-webdriver-to-automate-a

protractor 2.5.4 E/launcher - session not created: This version of ChromeDriver only supports Chrome version 79

断了今生、忘了曾经 提交于 2020-03-26 04:46:15
问题 I have researched a lot and used many possible solutions mentioned in the various forums, none of them worked for me. I am trying to run this in CI/CD pipeline although able to run the protractor test cases in local and able to launch the browser but in CI/CD pipeline build it is failing below are the details i am using below postinstall under scripts in package.json "postinstall": "npm uninstall -g webdriver-manager protractor && npm install -g webdriver-manager protractor && webdriver

Python Selenium webdriver: element not interactable: Element is not currently visible and may not be manipulated [duplicate]

别说谁变了你拦得住时间么 提交于 2020-03-25 18:19:43
问题 This question already has answers here : selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable when clicking on an element using Selenium Python (4 answers) ElementNotInteractableException: Message: element not interactable error while sending text to Email field on Quora using Selenium with Python (5 answers) Closed 17 hours ago . I have written following code to interact with the Acxiom website: from selenium import webdriver from webdriver_manager

How to add extension in firefox driver in Java using selenium

蹲街弑〆低调 提交于 2020-03-25 04:00:31
问题 How to add extension in firefox driver in selenium in Java Have tried below possibilities. 1st tried Solution FirefoxOptions firefoxOptions = new FirefoxOptions(); FirefoxProfile profile = new FirefoxProfile(); profile.addExtension(new File("/usr/local/bin/foxyproxy_standard-6.6.2-an+fx.xpi")); profile.setPreference("extensions.firebug.currentVersion", "1.8.1"); firefoxOptions.setProfile(profile); WebDriver firefoxDriver = new FirefoxDriver(firefoxOptions); It is not giving any error but it