3

I would consider the whole idea of verifying such logic from the UI perspective as a bad practice. See info on test pyramid. If you need to test the calculation logic of your service - you can do that on the unit and/or integration testing level, which would be much easier to do, since you will be free from external dependencies in that case. UI ...


1

You can easily reuse code in TestCafe using Page Object model/pattern. The way I organise a TestCafe project in the project dir is the following: . ├── config.json ├── Helpers ├── node_modules ├── Objects ├── package.json ├── package-lock.json ├── Resources ├── Results └── Tests In Objects/, you can declare a class that represents something on your ...


1

<div class="input group"> <input id="end_time"></input> <span class="input-group-btn"> <button class="btn btn-default"> <i class="fa fa-clock"></i> </button> <span> </div> You would want to use the following selector for the ...


1

https://developer.mozilla.org/en-US/docs/Web/XPath/Functions Browser supports only XPATH version 1.0 and matches is an XPATH 2.0 method, and so you can use only xpath 1.0 in selenium. The above linked document shows the supported XPATH methods. so in your case //mat-option/span[text()="someting" or text()="something" and so on ] //mat-...


1

You can use //mat-option/span[condition1 or condition2 or condition3] With XPath 2.0 or higher you could also use //mat-option/span[matches(., 'aaa|bbb|ccc')] But sadly the developers of Selenium are still stuck on XPath 1.0. Are you sure you want "text()" here rather than "."? With text(), the text must all be in one text node: no ...


1

Seems your switching tab is not working properly. Please check that new tab handler is okay. # collects handle ID of current window first_tab_handle = driver.current_window_handle print("first_tab_handle : "+str(first_tab_handle)) # collects handle ID after new tab is opened print("current window handle : "+ str(...


1

Your code is working fine , which protractor version are you using. Try using full path as mentioned in other answer and also try replacing CHromeoptions with googchromeOptions if first is nt working (new protractor version everything should work fine with justt chromeoption): https://github.com/SeleniumHQ/selenium/issues/5292 'capabilities': { '...


1

The ChromeDriver documentation states "Relative paths do not always work. For best result, use full path instead.". Explanation why it's not always working is lacking though. Using an absolute path should fix the issue. Detailed information can be found in the links below. ChromeDriver documentation https://chromedriver.chromium.org/capabilities ...


1

Based on the HTML, I would say that the problem you are having is that the page shows and hides fields based on where you are in the checkout process. Because of this, you should probably be using conditional waits - Wait.Until(ExpectedConditions.ElementExists(By.Xpath(yourxpath))); (Do not use my code - I'm familiar with C# so my examples follow C# syntax, ...


Only top voted, non community-wiki answers of a minimum length are eligible