One test. Two setup steps.
What you have described is very common, particularly as test scenarios get more complex.
What you need is one test with setup that does the user logging in, the user selecting the item (save the id) and then deleted and then you go the dashboard.
So don't think in terms of your two existing tests, think in terms of a new test but ...
It's an single integration test.
First of all it has nothing to do with playwright, it's common
automation scenario which can occur while using any automation
library/frameworks. I have faced this similar scenario in qtp,
selenium, protractor, and playwright .
Usually this will be an single integration test where we dynamically store ID on a
test level ...
I think there are two parts to this.
Write self-executing, living documentation through using BDD code as @kirbycope indicates.
Figure out a way to educate non-technical folks that 100% coverage never happens at a functional level (don't call it an 'education' of course, call it an opportunity for a deeper conversation about value or some such bs). 100 ...
<div class="input group">
<button class="btn btn-default">
<i class="fa fa-clock"></i>
You would want to use the following selector for the ...
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 ]
You can use //mat-option/span[condition1 or condition2 or condition3]
With XPath 2.0 or higher you could also use
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 ...
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(...
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):
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.