Posts

Showing posts with the label cucumber

JAVA PDF Compare On PDF Documents From Different States

Image
Clash Royale CLAN TAG #URR8PPP JAVA PDF Compare On PDF Documents From Different States I am an automation engineer (working in a Java framework) and recently due to compliance issues I have a need to create a test that compares multiple pdf documents. The pdf documents are of a legal nature and contain different verbiage per state. I have never done this before. Just looking for implementation suggestions, was hoping to avoid something yucky. I would be accessing each document via a link, which would open in Docusign. The scenario would be open the document for New York and then compare it to a baseline document for New York, open a document for Maryland and then compare it to a baseline document for Maryland, open a document for Virginia and compare it to a baseline document for Virginia, etc. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and ...

Protractor non angular tests do not obey waits and sleeps until there is an error in the code

Image
Clash Royale CLAN TAG #URR8PPP Protractor non angular tests do not obey waits and sleeps until there is an error in the code I am using Protractor and cucumber for automation tests on some non angular pages. I have set browser.ignoreSynchronization to true. When I run a scenario only the first line which is browser.get(...) is executed correctly. I can see the URL loads fine. All following steps are not executed (as I don't see them run in browser) but I see all green and all passed in the results. None of the waits and sleeps in the code have any effect on execution. However if there is an error somewhere in the code, lets say in the last step of scenario/stepdef I have wrong code browser.blah.something(); then I can see all sleeps and waits being obeyed. I don't understand what is going on! Why does this erroneous code cause Protractor to obey timeouts? Why this weird behavior? Any idea? Also just wondering why browser.blah.something() doesn't cause compile time error (...

How to use BeforeAll and AfterAll cucumber anonotation?

Image
Clash Royale CLAN TAG #URR8PPP How to use BeforeAll and AfterAll cucumber anonotation? I want to execute the below some action before feature file. public void beforeFeature() { File path = new File("D:\AccelareWorkFitComplete\ExtentsReports\"); File filename =path.listFiles(); for(File fi:filename) { if (fi.toString().contains("Automation")) { fi.delete(); } } } How is the question related to Selenium ? Am I missing something? – DebanjanB 20 mins ago Selenium i have implemented the selenium using cucumber framework BDD – Yashodip Patil 14 mins ago My question is how does your question in the ...

Popup window blocks any further action by Selenium webdriver on IE

Image
Clash Royale CLAN TAG #URR8PPP Popup window blocks any further action by Selenium webdriver on IE I am having pop-up window with "Ok/Cancel" using IE11. However, with selenium webdriver, I am unable perform anything on them. I have tried both: alert.accept() and switchto.window() without any success. I am unable to use dev tool on this popup as well. It wont allow me to do anything on the parent window. The keyboard "ENTER" and "ESC" works on this manually. ***Option1:*** try { WebDriverWait wait = new WebDriverWait(myDriver, 2); wait.until(ExpectedConditions.alertIsPresent()); Alert alert = myDriver.switchTo().alert(); alert.accept(); } catch (Exception e) { //exception handling } ***Option2:*** for(String winHandle : myDriver.getWindowHandles()){ if(!winHandle.equals(parentWindow)){ myDriver.switchTo().window(winHandle); try { WebDriverWait wai...