automated-tests

Selenium WebDriver to test an ActiveX Control

余生颓废 提交于 2019-12-13 03:38:25
问题 I have been working to automate some tests for my companies website using Selenium's IWebDriver, and have run into some ActiveX controls (a dialog to select and upload a file) that I cannot seem to automate. I haven't been able to find any specific information on this on the internet. I am, however, able to actually load the dialog box by triggering the "open" element within the page (the user will have to manually click the file destination and the open button), but it fails the test (this

Browsermob proxy sends Proxy-Authorization header after authorization on chained proxy - how to stop it?

我只是一个虾纸丫 提交于 2019-12-13 03:23:47
问题 I start my BMP with options like this: 'httpProxy' => 'proxy.com', 'proxyUsername' => 'user', 'proxyPassword' => 'password', 'trustAllServers' => true, and this works fine. After that I recieve proxy port from BMP and use it in my browser (system settings, no matter). After that I try navigate to http. Ok, my headers is fine. But after that I try navigate to https and my headers is not fine, because I see PROXY_AUTHORIZATION string with my real proxy username and password in base64 encoding.

unable to start a Process in Scala/Play application

我们两清 提交于 2019-12-13 02:48:50
问题 I have a ccm.py script which runs Cassandra cluster on local machine. I am able to run the command using windows command prompt. But I get error if I try to do so using Process class in Scala . I want to run it before starting my test cases. So I am calling Process in beforeAll . override def beforeAll():Unit = { println("starting cassandra cluster locally") val ccmCommand = Process("ccm.py start").! } The error I get is An exception or error caused a run to abort: Cannot run program "ccm.py"

How to Read the csv file data one by one and put into variable Using Groovy

余生颓废 提交于 2019-12-13 02:48:42
问题 Here i am facing One problem that. i want to read the csv file data and one by one put it into a variable and that variable i want to assign a next Http Request let say ids.csv file which consisting of values like this 23333 23334 23335 22336 23336 I am using Jsr223 PreProcessor code: def csvfile = new File('D:/datas/id/ids.csv') def lines =csvfile.readLines() lines.each { String line -> vars.put('Id_value', line.toString()) } If it is wrong, how to do this with simple code? 回答1: You need to

Robot framework split string and put in to sheet excel

筅森魡賤 提交于 2019-12-13 01:50:49
问题 I want to split Transaction ID:211444 , i want to get only value = '211444' and put it into sheet excel ? anyone please help 回答1: Use OperatingSystem.py and String.py libraries: ${string} = Convert to String Transaction ID:211444 ${id} = Fetch From Right ${string} ID: append to file ids.csv ID:${id}\n encoding=UTF-8 回答2: This might be useful to you . may sure you have xlsxwriter installed in your python packages . else do pip install xlsxwriter Below is robotfile content which will pass the

dyld: could not load inserted library

那年仲夏 提交于 2019-12-13 01:34:24
问题 When I try to run an UI and Unit tests, I get an exception: dyld: could not load inserted library '/private/var/containers/Bundle/Application//AutoTestingApp.app/Frameworks/IDEBundleInjection.framework/IDEBundleInjection' because no suitable image found. Did find: dyld: Library not loaded: @rpath/XCTest.framework/XCTest App builds with success but fails when running a test. I already tried: reinstalling Xcode checking a provisioning profiles and a certificates What am I doing wrong? 回答1: For

Selenium Executing JavaScript within the page

冷暖自知 提交于 2019-12-13 01:24:49
问题 I am using Selenium 2 and I need to execute some JavaScript in the page as part of the tests. I saw various examples on the web, no one of them seem to work. What I need to do it's this: after the user interacts with the web page, pressing buttons, adding text etc, I need to get the user selection, which is raw javascript is: public void jsTest() { WebDriver driver = new FirefoxDriver(); driver.navigate().to("http://www.tinymce.com/"); WebElement iframe = driver.findElement(By.tagName("iframe

Selenium:how to create test evidence report with NUnit

时光总嘲笑我的痴心妄想 提交于 2019-12-13 01:05:11
问题 I was wondering how one would create proper test evidence of Selenium UI tests. I was thinking about screenshots but they do not actually cover everything you have done as it is difficult to determine when to screenshot. (Every click or every wait or every pageload). Another option I thought about was screen recording, but this makes it rather difficult to work with parallelism as you record the whole screen and not a specific chrome window. However, you could possibly also take a screenshot

selenium scripts

余生颓废 提交于 2019-12-12 22:13:30
问题 I want to use selenium scripts to click on a bunch of links on my webpage one by one, each click results in a page refresh. However selenium doesn't support css pseudo class like :visited, so I can't distinguish the ones that are already clicked from the ones that I want to click on next. Is there a way to solve my problem? here's my code: http://pastebin.com/z0uRTHHp 回答1: New answer for solving using Selenium IDE: Note: You'll need to install the Flow Control plugin from https://addons

TestWatcher and TestNG

限于喜欢 提交于 2019-12-12 19:19:34
问题 All, I use JUnit and TestWatcher along with Selenium (Java). Using TestWatcher upon failure and success, I place calls to a bug tracking tool API to lock test cases and defects. I now want to generate a report of my Selenium test runs and lock the test cases and defects. I was thinking of using TestNG to generate reports but my TestWatcher won't work with TestNG. I need some replacement of TestWatcher as i want to now replace junit with TestNG. Anyone know anything like TestWatcher to use