Paypal-Sandbox buying with Selenium RC - selenium-rc

I'm trying to buy something at Paypal-Sandbox with Selenium RC (Java), but it doesn't work.
I tried it with Selenium IDE (Firefox AddOn) and it did work. I changed the viewing and copied the JUnit 4 Code and it still doesn't work.
The problem is the part with the radio-button "payment_type_paypal". Somehow it doesnt work in RC (the radio-button is not checked). Do someone have similiar experiences and/or resolved the issue?
After loging in to developer.paypal.com and entering the homepage...
//linking homepage
selenium.click("legalTerms");
selenium.click("pay");
selenium.waitForPageToLoad("30000");
//leaving homepage and switching to paypal
selenium.click("payment_type_paypal"); // <===== point of error
selenium.type("login_email",username);
selenium.type("login_password",pw);
Thx :)

its me againg, Krzys. I know now the Problem. Its an issue with focussing the correct frame. I couldn't get it work with Selenium RC.
You can easily fix the issue in Selenium WebDriver with the command, before my "point of error":
driver.switchTo().defaultContent();

its me again. If you encounter problems with the Sandbox System of Paypal, you can overcome the "submit"-button issues using xpath.
driver.findElement(By.xpath("//div[#id='nav-menu']/form/ul/li/ul/li[6]/input")
Greetz
Krzys

Related

Receiving an AJAX error when trying to add a block in Drupal 8

I did a clean install of Drupal 8.6.1. I neither installed any theme or module nor did I place any information or altered the configuration. I simply uploaded and installed/configured Drupal via the browser without any warnings or failures.
But when I try to add a block by clicking on the "Place block" Button within "Structure"/"Block layout" nothing happens. Safari/Chrome console prints this ajax error: "The response failed verification so will not be processed."
I installed Drupal on three different webspaces by now - same result. I tried Chrome, Safari and Firefox - same result. I even downloaded again the whole package from drupal.org and reinstalled it - same result.
Has someone experienced (and solved) the same problem?
To hell! I've been dealing with this problem for hours now and I'm almost desperate... and now I realize that the firewall was the problem (we're behind a WatchGuard Firewall at work).
Unfortunately, I don't know exactly how to solve it, but everything works fine outside our network.

A minimal Nightwatch test doesn't work with Firefox 57

Here is a reproduction repo:
https://github.com/anatoliyarkhipov/nightwatch-firefox
It's a clear installation of nightwatch and webdriver-manager. The test opens http://example.com, clicks on the link and checks some content on the next page.
The problem is that if I run it in Firefox, it fails on the first step where we check that <body> is visible. If we change firefox to chrome in nightwatch.conf.js, then the test will pass.
I run it on Windows 10, Firefox 57.0 (64-bit).
What am I doing wrong?
You are missing path to the driver files in your config files
https://github.com/IvanNaumenko/test-project-nightwatch-cucumber
Hey!
This is nightwatch with cucumber. Download and write tests like in example here. You won't regret
Make sure you have the right version of geckodriver. Get the latest here: https://github.com/mozilla/geckodriver/releases

Selenium Firefox 19 CSS Menu Click Not Working

Using Selenium, with an earlier combo of the webdriver (2.28.0) and Firefox (pre-19), the following code worked.
driver.get("http://www.haemonetics.com/en");
driver.findElement(By.linkText("LOGIN")).click();
driver.findElement(By.linkText("Haemonetics")).click();
With webdriver 2.31.0 and Firefox 19.0.2 the code does not work and I receive a NoSuchElementException for the second findElement.
I tried using xpath which doesn't work for Firefox but does work for Chrome and IE, which are part of the same test suite.
Any thoughts or another way to accomplish the same thing? I would prefer to use the same code for the mentioned browsers.
Not sure if it was a typo on your part, but it should be "find_element" instead of "findelement", at least it's so in 2.31 to my knowledge.
Try
driver.find_element_by_link_text("LOGIN")
if that doesn't work, post your HTML code so we can possibly construct a working Xpath.

Watin support for IE 9 - Part 2 (Specific)

Watin Runtime Version: v2.0.50727
Browser: IE 9
I have found a specific issue:
BaseIEController.IE.Element(fieldname).Exists throws an Exception as under:
"It's not possible to find the element because no element finder is available."
The fieldname here is a Regex for a link, a simple Regex where the Link's Id is passed.
This works with IE 8.
I cannot use the Final Release of Watin 2.0 since the LogonHandler is not complete (not fully functional as mentioned in the Release Document. I have tried testing it as well).
Any idea on how I can get this Element thingy to work??
Thanks,
K
Today I have upgraded to IE9 on my windows 2008 system and run all the 745 WatiN 2.x unittests and found no issues (accept for one dialog handling the javascript::return dialog fired by onbeforeunload event).
Let me know if you have more specific info/ code example will help too to reproduce the issue you reported.
Jeroen
Lead dev WatiN
Thank you for the response. Firstly, Awesome job with Watin :)
I am trying to run the test using VS2008 and IE 9. The goal is to Click a Link but before that I am verifying if the Link is exists.
The Regex I use for this link is LnkSignIn = new Regex(".*linkSignIn$");
I then use BaseIEController.IE.Element(fieldname).Exists where the fieldname is an Attribute Constraint (in this case the Regex). This would return a true or false if the Link is found. If found, I then click the Link. Instead it returns the Error MyTestInitialize threw exception. WatiN.Core.Exceptions.WatiNException: WatiN.Core.Exceptions.WatiNException: It's not possible to find the element because no element finder is available.. at WatiN.Core.Element.WaitUntilExistsOrNot(Int32 timeout, Boolean waitUntilExists)
...
This works just fine with IE 8. Further, I noticed that if I change Element to Link, it returns true. But since this is a generic method, I want to keep it as element. Hope this helps. Please let me know if you need more information. Thanks.

Watin - IE8 hangs on FileUpload.Set

Whenever I call FileUpload.Set, IE8 will open up the file browser window and just sit there without typing any text. This is on Windows XP and it used to work just fine until I upgraded from Ie7 to IE8. Anyone else run into this?
Turns out this line in the WatiN source was the problem:
if (Process.GetProcessById(window.ProcessID).ProcessName != "iexplore") return;
For some reason, the iexplore process on this machine appears as "IEXPLORE", in all caps. Adding a .ToLower() to the process name fixes the problem.
edit: looks like this bug has already been reported.
Because of the way WatiN looks for the dialog box (by style number), it's understandable that IE8 would be broken in versions less than 2.0. You may want to try it with the 2.0 beta.
Alternatively, you can dive the style numbers on the FileUpload DialogHandler and add the style numbers for IE7 and 8 (96CC20C4 and 96CC02C4).
I'd like to post an update for this problem since it came up again in Win7 OS.
If you have the same problem in the latest WatiN release you can override the function CanHandleDialog in the FileUploadDialogHandler class:
public override bool CanHandleDialog(Window window, System.IntPtr mainWindowHwnd)
{
return true;
}
It's not a clean solution but it is the simple and works.

Resources