automated-tests

Robot framework, Python - handle lazy load on page with dynamic content

白昼怎懂夜的黑 提交于 2019-12-13 07:23:20
问题 I have a page with dynamically generated table ( rows are dynamically generated ). In my test I do NOT know how many rows to expect . I just create a dictionary from all the rows and then compare to another dictionary. But the table has lazy load, so when the number of rows is higher, some of the rows which should be there are not visible "on the first sight" but it needs to be scrolled down to get them. So those rows are not included into my dictionary and then it fails... But again, I do

How to enable private browsing for Safari in the Protractor configuration

痞子三分冷 提交于 2019-12-13 07:05:01
问题 I've been searching for a way to enable private browsing for Safari in the protractor conf file. I have gotten chrome to work with private browsing, with the below chromeOptions: { args: ["incognito", "disable-extensions"] } I havent found anything similar with Safari, if anyone can help that would be great. Thanks. 回答1: According to the WebDriver's documentation, what you are looking for is the cleanSession property. It makes sure the session has no cookies, cache entries, local storage, or

Can't find an element on a webview page of an iOS native app using Appium

女生的网名这么多〃 提交于 2019-12-13 04:51:46
问题 I have a native app which opens few web-view pages. I'm running appium on the app to do some automation test on a web-view page that I need to scroll down to find the username and password fields. I tried all the suggestion I can find online, and it doesn't work. Can anyone help? I'm running: Appium v1.3.5 iOS 8.1 Here is my code: // switch to webview Thread.sleep(6000); final Set<String> contextNames = driver.getContextHandles(); for (final String contextName : contextNames) { System.out

Coded UI - UITestControlCollection using FindMatchingControls() is empty on consecutive runs

半腔热情 提交于 2019-12-13 04:48:32
问题 I use SpecFlow with Coded UI to create some automated functional tests for a WPF application. Let's see the following SpecFlow scenario: Scenario: Issue When Results button is pressed When Result 123 is selected When Results button is pressed When Result 123 is selected 1st and 3rd row parameter: Results 2nd and 4th row parameter: 123 Here are the methods for the upper mentioned steps: When Results button is pressed public void PressButton(string buttonName) { WpfButton uIButton = this.UIAUT

Screenshot iOS: WebView Context : Full page screenshot and not just visible viewport

被刻印的时光 ゝ 提交于 2019-12-13 04:38:49
问题 I need to take screenshot of Safari browser on iOS, but the screenshot has to be of whole page rather than just visible viewport. Like we get in firefox in WebDriver. Any suggestions? Currently Using: Selenium and Appium PS: I prefer not using any external applications, maybe any solutions via selenium/appium. 回答1: Install any of the below app. Barry:-http://barryapp.com/ Website Screenshot :- https://itunes.apple.com/us/app/website-screenshot/id437683442?mt=8# 来源: https://stackoverflow.com

Selenium Grid Hub with node(s) set up. Whats next? (Picture included)

核能气质少年 提交于 2019-12-13 04:34:35
问题 I am using Selenium 2 and I have the grid hub currently set up. I have a local node in place. This is what my hub looks like. I want to load the same webpage on a number of these browsers. Is it time for me to start writing the webdriver code?(using c# on VS?) 回答1: I can only provide you some java code, but C# should be quite similar. String gridconfig = "your grid url"; DesiredCapabilities capabilities = DesiredCapabilities.firefox(); RemoteWebDriver driver = new RemoteWebDriver(new URL(this

How to validate deployment packages created by msbuild? (preferably using mstest or nunit)

柔情痞子 提交于 2019-12-13 04:23:15
问题 Our msbuild process creates a variety of zip packages for deployment (mostly web sites, but other things as well). We have a variety of recurring problems that keep sneaking back - files included that shouldn't be, missing resources. This screams for automated validation. The criteria to test for are simple Validation of foosite package: Resource files are present. No test result files, obj files, or other build artifacts And so forth. Ideally, I could use nunit or mstest, which everone is

Coded UI - C# - time itemprop tag - how to validate year exists

回眸只為那壹抹淺笑 提交于 2019-12-13 04:23:01
问题 I received help from @dlatikay in a slightly different question yesterday, that helped me resolving false positive error partially. Here is the code snippet: string countCurrentYearQA = (string)(window.ExecuteScript("count = 0; if(document.body.innerText.toString().indexOf('" + nowYearQAString + "') > -1){count = 1;} return count.toString();")); string countPastYearQA = (string)(window.ExecuteScript("count = 0; if(document.body.innerText.toString().indexOf('" + pastYearQAString + "') > -1)

Selenium IDE How to set timeout?

别等时光非礼了梦想. 提交于 2019-12-13 03:59:27
问题 I'm using Selenium IDE and when trying to use wait for element present command, i got this error: But i couldn't find anywhere to set the timeout at all, i'm using the Chrome extension Any help would be appreciated! 回答1: I was able to figure out after looking at Reference tab. It is set using Value field. 来源: https://stackoverflow.com/questions/55599070/selenium-ide-how-to-set-timeout

Appium Date Picker Scroll android

杀马特。学长 韩版系。学妹 提交于 2019-12-13 03:46:03
问题 Hey Guys I am new to Appium Automation testing... I need to work on automating the android default OS Date picker dialog as per the below image. Can some one help me on this?Date picker dialog 回答1: Just Use the below code First open your date picker and use the sample code.. public static String datePicker_ui_id = "android:id/datePicker"; public static String pickers_ui_id = "android:id/pickers"; public static String NumberPicker_ui_id = "//android.widget.NumberPicker"; public static String