protractor

How do bring down a connect server in Grunt?

房东的猫 提交于 2019-12-22 12:07:21
问题 I'm running protractor tests on a connect server, since there is no built in web server as in karma. No problem with that, only karma shuts down its web server once it's done running the tests but there is no such mechanism in protractor. I'd like to run protractor tests on a connect server and then spin up another connect server, potentially with a different configuration. So far I've managed to run another connect server on a different port but I still have the two connect servers running

Running multiple browser instances in the same test spec

﹥>﹥吖頭↗ 提交于 2019-12-22 11:34:12
问题 If I have a single spec that is using page object model, how do I run multiple browser instance for that same spec? For example I have spec: it('should run multi browser', function() { browser.get('http://example.com/searchPage'); var b2 = browser.forkNewDriverInstance(); b2.get('http://example.com/searchPage'); var b3 = browser.forkNewDriverInstance(); b3.get('http://example.com/searchPage'); SearchPage.searchButton.click(); b2.SearchPage.searchButton.click(); //fails here b3.SearchPage

Getting “is not a thenable” message while using “eventually” in protractor chai

我与影子孤独终老i 提交于 2019-12-22 11:24:02
问题 When I tried to verify the condition as below. var val1 = "ONE"; var val2 = "TWO"; expect(val1==val2).to.eventually.equal(false) I'm getting false is not a thenable message, If I removed eventually condition as below then it working fine. var val1 = "ONE"; var val2 = "TWO"; expect(val1==val2).to.equal(false) Can anyone help me to understand the difference. Also If the condition fails, It displays the error message and not executing the hooks.js . 回答1: In simple words: eventually - is a method

Converting XML JUnit report to HTML [duplicate]

杀马特。学长 韩版系。学妹 提交于 2019-12-22 10:48:41
问题 This question already has answers here : How can I generate an HTML report for Junit results? (7 answers) What XSLT converts JUnit Xml format to JUnit Plain format (1 answer) Custom JUnit Report? (3 answers) how can i create a html report for the junit xml report manually? (2 answers) Closed 2 years ago . I have been generating junit xml report till now for my Protractor tests, but as tests are increasing I need to get a HTML report for the tests. Can we change the junit xml report to HTML

Error while waiting for Protractor to sync with the page: "window.angular is undefined

半城伤御伤魂 提交于 2019-12-22 10:27:21
问题 I've just started to use Protractor. I created several page objects and everything is working fine till now. I log in to a page and I'm being redirected to the myaccount page. On that page, I got the following error: Error while waiting for Protractor to sync with the page: "window.angular is undefined. My code is here: var myaccount = function(){ //some function but everything is commented out }; module.exports = new myaccount(); Here is my login test as well: this.loginSuccess = function(){

Test a Chart.js canvas with Protractor

本秂侑毒 提交于 2019-12-22 10:15:37
问题 I'm fairly new to protractor so sorry if this is a stupid question. I'm looking into testing an application and need test the values inside a Chart.js graph. Has anyone got any ideas on how to get my protractor program to look inside the canvas. This is the canvas output in HTML. <canvas id="test" class="chart chart-line ng-isolate-scope" data="test.data" labels="test.labels" series="test.series" legend="true" options="test.options" colours="test.colours" width="1816" height="800" style=

Install specific chromedriver for protractor

廉价感情. 提交于 2019-12-22 10:10:57
问题 I am having an issue with chrome driver that runs on the CircleCi. The problem is that when running: ./node_modules/.bin/webdriver-manager update and then checking the version of chromedriver and selenium with the command: ls -lt node_modules/protractor/selenium it shows the latest versions are: selenium-server-standalone-2.45.0.jar chromedriver chromedriver_2.15.zip According to the npm.taobao.org note ChromeDriver version 2.15 supports Chrome v40-43. But CicleCi documentation says that it

How can we set zoom level in selenium/protractor i.e zoom to 90%

為{幸葍}努か 提交于 2019-12-22 08:45:09
问题 How can we set zoom level in selenium/protractor zoom page size to 90 percent etc 回答1: Dont know whether an equivalent is there in protractor (since never worked), but this is how I would zoom-in and out in java webdriver via JavascriptExecutor using: document.body.style.transform='scale(0.9)' where 0.9 is scale percentage. Though for zoom u can also use document.body.style.zoom='90%' but this won't work on firefox and opera. Hope this could be helpful. 回答2: For Selenium: ((JavascriptExecutor

How to get jasmine tests to load data and execute in the right order

*爱你&永不变心* 提交于 2019-12-22 08:38:15
问题 I'm using Jasmine (2.3.2) and Protractor (2.5.1) for my UI tests. I need to load in data and generate tests for each item from that array. I have a function ( checkItem ) that creates a new describe function for each item and checks certain properties on that object. This is a very simplified version of my code and there are other tests that run before these. If I call checkItem in a describe statement, itemsArr isn't defined yet. So I'm not sure how to get the data loaded and create dynamic

selenium webdriver manager update - npm

寵の児 提交于 2019-12-22 08:36:46
问题 I tried to update the selenium webdriver using the "webdriver-manager", but i get the error as, Error: Got error Error: read ECONNRESET from https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar Error: Got error Error: read ECONNRESET from https://selenium-release.storage.googleapis.com/2.48/selenium-server-standalone-2.48.2.jar fs.js:60 throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs ^ Error: EPERM: operation not permitted, unlink