Friends, I wanted that at the time of the test, every time I validate a text or insert a value in a field, the playwright highlights the yellow color. Does anyone have this feature?.
I'm using playwright with JS.
Related
So I'm working in Google Sheets using Apps Script, on a spreadsheet that has 4 tabs. Names are: "Testing Plan","Blue Test Catalog", "Red Test Catalog", "Green Test Catalog".
On the Catalog Tabs, I want the Leads to go in, and click all the checkboxes for all the tests that need to be completed. So Blue Lead reviews and assigns all the Blue Tests from the Blue Test Catalog, and Red/Green Leads do the same. Once each person has checked all their boxes, they click a button on their sheet "Add To Plan".
All of the checked boxes and their rows from their tab are then copied over to the Testing Plan tab, under the corresponding Test Section (Blue Tests, Red Tests, Green Tests). So I have one neat doc that lists all the tests in one place by their category.
The trick is, I need the code to be able to insert enough blank rows under each section to accommodate the list of items being copied over from each section.
I then want to be able to clear the doc and "reset it" back to how it looks now, as needed (via button click).
I'm not good at coding - its not a normal part of my job. But I've been able to piece some things together over the years based on my google searching and this website, so I thought I'd reach out for help. I unfortunately don't even have any sample code to work off of. I've spent 2 full days attempting this and keep deleting. I've managed to at least write a script to copy and paste a range based on whichever button/sheet location I'm at, but it copies to the bottom of the page. I can't figure out how to do a list filter based on checkbox value being TRUE, and then only copy and paste those values. And then I'll need to figure out how to have the code search and match 'Blue Tests' from the Blue Test Catalog tab with the word 'Blue Tests' on the Test Planning Tab and paste 4 rows down from that, inserting new rows as needed to ensure no overwriting.
Any help would be appreciated. Sample Sheet here.
Why not doing it with this simpler way
={"Blue test","","","","";query('Blue Test Catalog'!A3:AG,"select B,K,N,Q,X where A=true",1);
"","","","","";
"Red test","","","","";query('Red Test Catalog'!A3:AG,"select B,K,N,Q,X where A=true",1);
"","","","","";
"Green test","","","","";query('Green Test Catalog'!A3:AG,"select B,K,N,Q,X where A=true",1)}
I add some conditonal formatting
something possible to do to split the formula in 5 packages
I have a site which is populated from a database. I want to access the pages in Selenium. The number pages associated with a particular topic is variable.
Using Selenium I am clicking through successive pages using a line like
driver.find_element_by_xpath("""//*[#id="mainContent"]/
div[2]/div/div[2]/div[1]/
div[3]/div[2]""").click()
This works successfully.
However I would like to detect when the element I am clicking (a next button) is "greyed" out rather than having to predict how many pages are available.
Currently I am using a block of code inside a for loop with a counter for the number of available pages.
EDIT: The page element has the word Inactive added when it is "greyed out" as in
<div class="paginationBtn paginationNextContainer inactive"><div class="icn chevron-left"></div><div class="visuallyHidden">Previous</div></div>
If your button is changing its color on click, it's associated with CSS attribute.
I advise to look at this answer to learn the subject. For your case, I advise you to develop a method to get the button color value before and after, as your script should operate accordingly.
Using Robot Framework (with Selenium) to automatically fill a form - it's a checkout page on a ecommerce website,
It bugs at the very last step, when trying to enter the CVC code of a test credit card,
Robot throws a "InvalidElementStateException: Message: invalid element state: Element is not currently interactable and may not be manipulated"
when the field is clearly visible and actionable.
Using Chrome, not Firefox (can't get it to work at all with FF)
I made sure the test scrolls the page down to see the field, but it still considers that field to be hidden or not actionable.
Has anyone run into the same issue here?
Section of the code that fails is here:
Card Payment is Visible
Execute JavaScript window.scrollTo(0,700)
Wait Until Page Contains Expires
Focus xpath=//*[#id="securityNumber"]
I Enter the CC Security Code
Input Text securityNumber ${CHECKOUT_CARD_CODE}
I Click Submit Order
Submit Form forms.payByCardForm
(the bits about "Focus" and "Input Text" are the ones that fail. I validate the text "Expires" is visible, it's right above the CVC field...)
I also tried:
Wait Until Element is Visible id=securityNumber
But it still fails.
It takes a screenshot and it's clearly there...
Oh well...payment forms you don't build yourself will always be trouble. This one is built using AngularJS so it's even more trouble.
I found how to locate the proper field by using a css property, since there is a hidden form that contains the same field with the same ID and Name.
I did have to use "Sleep" for it to work as well (thx Goralight).
And thanks to everyone else.
Use unique identifiers. Had same issue with the "description" field. Upon using View Source [Code] I see "description" in my HEAD META tag. Changed id fields to use "product_description" - error is gone. Code works.
I am new to Polymer and I am struggeling to make a nice approach of an initialisation of a neon-animated wizard.
In my interface, the user should be able to register in different steps:
General Information (E-Mail, Username,...)
Personal Information (First Name, Last Name, etc...)
Other stuff...
Each time the user finishes one step, the wizard "slides" to the next step (with a neon-animation).
My problem is that I don't know how to reset the wizard when the user leaves the registration and comes back in. For instance, if I'm on step 2, leave the registration page and press the button"Register" again, the user is still on step 2. I want it to be step 1. It only works if I refresh the browser Window (Pressing F5).
I hope I could make it clear, posting code would just make it more difficult in my opinion.
When the register button is clicked, set the "selected" property of the "neon-animated-pages" to 0 (if you didn't set "attrToSelected") or to the value of your first page, that will transition to the first page.
Here's a quick example
http://jsbin.com/sulitowuge/edit?html,css,js,output
I am relatively new to Codeception and am trying to perform acceptance testing of a form using it and Selenium WebDriver with Firefox. The form (available at http://www.brighton-hove.gov.uk/content/parking-and-travel/parking/find-your-parking-zone ) consists primarily of a text box and an auto-populated which is inserted into the DOM in the event that the input into the text box results in multiple matches; each field also has a submit button.
The issue I am experiencing is that, when tested normally in Firefox the behaves as expected and is auto-populated in cases where the initial, textual search returns multiple matches (for example, entering any Brighton postcode, although the particular scenario is to search for 'Brighton Town Hall, Bartholomew Square', which returns 3 results). However, when attempting to test via Codeception (either running a complete test or attempting each step via the console), the gets inserted into the DOM but never appears to be populated with real results (the only element it contains being 'Please select your address...').
My test steps are as follows:
$I->amOnUrl('http://www.brighton-hove.gov.uk/content/parking-and-travel/parking/find-your-parking-zone');
$I->fillField('Enter your postcode or house number and street','Brighton Town Hall, Bartholomew Square');
// XPath is used here as the form elements' 'id's, 'class'es and 'name's are auto-generated (the one above just happens to have a label).
$I->click("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[3]/div/input[#type='submit' and #value='Search'])";
// I've also tried using 'submitForm(...)' here, rather than just clicking the button.
// Wait an unnecessarily long amount of time in the hope that the dropdown appears and is also populated...
$I->waitForElement("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select", 5);
// The first option is there...
$I->seeElementInDOM("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select/option[1]");
// ...but it doesn't have 4 options, as expected.
$I->seeNumberOfElements("//div[#id='achieveform']/form/div/div/div[1]/div[1]/div/div[7]/div/div[3]/div/div[1]/span/select/option", 4);
Although the test I am looking to perform is essentially black-box my next course of action is to attempt to look into tracing the form submissions and DOM updates, even though that level of knowledge of the underlying structure of the system should not be necessary. Am I overlooking something simple? Any pointers would be appreciated.
Apologies, it turns out it wasn't anything to do with Codecepetion after all: the issue was partly to do with the backend logic behind the search form (which doesn't seem to like the comma) and partly due to me for not noticing that the behaviour with the empty dropdown did actually also occur when performing the same actions outside of Codeception.
Moderators: this thread can be closed/removed (as the issue was a non-issue within the context of Codeception) now.
Seems you are not filling value in the right field or the text input field of the search box:
instead of:
$I->fillField('Enter your postcode or house number and street','Brighton Town Hall, Bartholomew Square');
Use:
$I->fillField('.dataelr input', "Your Value here");
Hope it helps.