protractor-net

System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation

人盡茶涼 提交于 2021-02-02 10:04:51
问题 I am trying to automate a reactjs application and the framework our project is using built on C# and protractor-net. After any click or assert function I get the following error, but the defined action in the code executes successfully. System.Reflection.TargetInvocationException : Exception has been thrown by the target of an invocation. ----> OpenQA.Selenium.WebDriverTimeoutException : timeout What is the cause of this error? using NUnit.Framework; using OpenQA.Selenium; using OpenQA

Timed out waiting for async script result Selenium C# Protractor

冷暖自知 提交于 2020-01-01 12:13:11
问题 I'm trying to create an automation test script using Protractor.net for an AngularJS platform, with Selenium in C#. I've created the driver using the below code. driver = new FirefoxDriver(); Ngdriver = new NgWebDriver(driver); And then attempted to locate and element as follows: Ngdriver.FindElement(NgBy.Model("vm.reference")).SendKeys("Test"); However, I'm receiving an exception: Timed out waiting for async script result after 45ms. Thanks in advance 回答1: I resolved this by using the

Selenium/Protractor .NET test hangs when using BrowserStack iPhone on remote website

点点圈 提交于 2019-12-25 03:59:15
问题 I'm having issues testing iPhone on BrowserStack with tests written in C# with Selenium and Protractor-net. The test starts running and after it opens the webpage to my website, it just hangs and never moves on to the StringAssert step. There are no errors when this happens. I must manually stop my test and the session in BrowserStack to continue. I tried turning on logging from within BrowserStack's capabilities, but no errors are returning and the console log is empty. I've tried multiple

Using Data Objects while E2E testing with Protractor

风格不统一 提交于 2019-12-22 14:16:35
问题 So a coworker and I were discussing making a data object for our e2e tests. From my understanding about data objects they are used for decoupling your test suites. For example, my first test suite is to create an account and to test if the fields are valid and the second test suite logins into the account and does its own tests. I am told it is good to use data objects (not a page object) just incase the first test suite fails when making an account. That way we can use the data object in the

StaleElementException when Clicking on a TableRow in an Angular WebPage

懵懂的女人 提交于 2019-12-20 07:47:15
问题 <div id="crm" class="row gridrow clickable ng-scope" ng-repeat="customer in customerList" ng-click="gotoRecord(customer.id)"> <i class="col m1 s1 tiny fa fa-male"></i> <div class="col m3 s11 ng-binding"> Allard</div> <div class="col m2 s12 ng-binding"></div> </div> I have this snippet of HTML, it's one row displaying as a result of a search action for a Customer with nameCustomer 'Allard'. I want to click on this customer to continue to the next page but most of the time this results in a

How to test Pagination feature using Protractor

蹲街弑〆低调 提交于 2019-12-11 14:38:30
问题 Please guide me how to navigate through different pages of pagination using Protractor , i followed this blog: http://seleniumhome.blogspot.com/2013/07/how-can-we-automate-pagination-using.html, unfortunately the code is not working. Here is the code from my application: <div class="vertical-align"> <ul class="pagination no-margins"> <li class="arrow unavailable" ng-class="{unavailable: currentPage === 0 || pagedRowsTotal.length == 0}"> <a class="ng-binding" ng-click="loadPage(0)" ng-bind

Protractor-net, non angular login page

女生的网名这么多〃 提交于 2019-12-11 10:11:36
问题 Using protractor-net, Login page is non-angular , where as the home page is angular. hence cannot launch browser with url using NgWebDriver , probably since its looking for angular. tried angular.ignoreSynchronization="false" . But same issue. If I use angDriver.WrappedDriver.FindElement to cross login, the angular objects in home page are not recognized- Asynchronous script error-timeout. driver = new ChromeDriver("C:\\FTWork\\DriverFiles\\chromedriver_win32\\"); driver.Manage().Timeouts()

Testing ASP.NET Core app using Protractor in Visual Studio 2015

孤街醉人 提交于 2019-12-08 02:02:39
问题 I've got a ASP.NET Core Project based on the angular2 template from the core template pack. I added a second project with xunit and protractor to run unit test against my main app. Both work nicely alone, there is just one small thing I miss: When I want to run the protractor tests I need to host the main project somewhere manually. If I don't host the main project manually it does not run, so all the Tests fail because my page is unreachable. I probably need to start the main app / project

Using Data Objects while E2E testing with Protractor

你离开我真会死。 提交于 2019-12-06 05:24:05
So a coworker and I were discussing making a data object for our e2e tests. From my understanding about data objects they are used for decoupling your test suites. For example, my first test suite is to create an account and to test if the fields are valid and the second test suite logins into the account and does its own tests. I am told it is good to use data objects (not a page object) just incase the first test suite fails when making an account. That way we can use the data object in the second test suite to create a new user just for testing login. My problem is that if my first test

Timed out waiting for async script result Selenium C# Protractor

女生的网名这么多〃 提交于 2019-12-04 10:45:14
I'm trying to create an automation test script using Protractor.net for an AngularJS platform, with Selenium in C#. I've created the driver using the below code. driver = new FirefoxDriver(); Ngdriver = new NgWebDriver(driver); And then attempted to locate and element as follows: Ngdriver.FindElement(NgBy.Model("vm.reference")).SendKeys("Test"); However, I'm receiving an exception: Timed out waiting for async script result after 45ms. Thanks in advance I resolved this by using the SetScriptTimeout. ngDriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(10)); 来源: https:/