[Cubano] The passed url is not loaded

10 views
Skip to first unread message

Hung dao quang

unread,
Jul 2, 2021, 7:00:29 AM7/2/21
to concordion
Hi all,

 I am newbie (QA) and converting scripts from another selenium-based to Cubano. Let me give a brief information about feature which I am encountering issues:
1. Go to Signup page, enter essential information
 ->Expected: the login page is loaded.
2. On Login page, enter registered information (username, password)
-> Expected: the Home page is loaded with On-boarding dialog

I created 3 pages object classes (SignUp, SignIn, HomePage) and a WorkFlow page
When running the fixture file (running stand-alone) the Chrome is invoked but the url is "data:," instead of signUp url ( sure that the url is configured in user.properties file). The error message is not find element.
Would you all possibly give more hints or ides to debug.
Screen Shot 2021-07-02 at 17.47.55.png

Any ideas to debug more.

```
package cypress.realworldapp.ui.workflow;

import cypress.realworldapp.ui.domain.SignInPage;
import cypress.realworldapp.ui.domain.SignUpPage;
import org.concordion.cubano.driver.BrowserBasedTest;
import org.concordion.cubano.template.driver.ui.PageObject;
import org.openqa.selenium.support.ui.ExpectedCondition;


import java.util.function.Consumer;

public class SignUpWorkflow extends PageObject<SignUpWorkflow> {
    
    public SignUpWorkflow(BrowserBasedTest test) {
        super(test);
    }

    public static SignUpWorkflow invokeProcess(BrowserBasedTest browserBasedTest){
        return new SignUpWorkflow(browserBasedTest);
    };

    public SignUpWorkflow callSignUpProcess(Consumer<SignUpPage> signUpPageConsumer){
        SignUpPage signUpPage = new SignUpPage(getTest());
        signUpPageConsumer.accept(signUpPage);
        return new SignUpWorkflow(getTest());
    }

    public SignUpWorkflow callSignInProcess(Consumer<SignInPage> signInPageConsumer){
        SignInPage signInPage = new SignInPage(getTest());
        signInPageConsumer.accept(signInPage);
        return new SignUpWorkflow(getTest());
    }

    @Override
    public ExpectedCondition<?> pageIsLoaded(Object... params) {
        return null;
    }
}

```



Fixture file:
```
public class SignUpFixture extends CubanoDemoBrowserFixture {

    public void signUpWorkFlow(String fullName, String userName, String password, String confirmPassword) {
        SignUpWorkflow
                .invokeProcess(this)
                .callSignUpProcess(p -> {
                    p.goTo();
                    p.registerAccount(fullName, userName, password, confirmPassword);
                })
                .callSignInProcess(p -> {
                    p.signIn(userName, password);
                });
    }

    public boolean assertSignUpSuccessfully() {
        return HomePage.open(this).isOnBoardingDialogDisplayed();
    }
}
```


``` markdown file

## Feature: Sign up

In order to work on web application

As a new client

I want to create an account by myself to serve my purposes

## Acceptance Criteria
As a new customer, I want to create an account by myself to login to the system

### AC1: Create new banking account

Submitting essential and valid information on SignUp page, user could log-in to the
system properly and encounters the On-boarding dialog.

#### [Example](- "create account and sees On-boarding process")
<div>
<p concordion:execute="signUpWorkFlow(#fullName, #userName, #password, #confirmPassword)">

**Given** [John Loan](- "#fullName") registered essential and valid information on Signup page

|User Name | Password|Confirmed Password|
|----|----|---|
|<span concordion:set="#userName">john.loan</span>|<span concordion:set="#password">12345678x@X</span>|<span concordion:set="#confirmPassword">12345678x@X</span>|

**When** he logs-in to the system

**Then** the On-boarding process is [loaded properly](- "c:assert-true=verifySignUpProcessSuccessfully()")

</p>
</div>
```

 

Nigel Charman

unread,
Jul 2, 2021, 7:48:01 AM7/2/21
to conco...@googlegroups.com
ChromeDriver normally starts with "data;" before going to a url. Are you calling the WebDriver#get(url) method anywhere?
--
You received this message because you are subscribed to the Google Groups "concordion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concordion+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/concordion/b28a7b7f-4614-46e9-b18c-bb62e2a22457n%40googlegroups.com.

Nigel Charman

unread,
Jul 2, 2021, 7:52:20 AM7/2/21
to conco...@googlegroups.com
or navigate().to(url);

Looking at some of the cubano code, it seems to use
getTest().getBrowser().getDriver().navigate().to(url)

Hung dao quang

unread,
Jul 2, 2021, 8:46:18 AM7/2/21
to concordion
On Fixture file, I call 


Screen Shot 2021-07-02 at 19.42.03.png

The p.goTo() is from SignUpPage
Screen Shot 2021-07-02 at 19.43.31.png

However, the test get failed when initializing the SignUp instance (the line is highlighting below), that what I get so far. Please let me know if you need more information

Screen Shot 2021-07-02 at 19.45.04.png

Jimmy Kemp

unread,
Jul 2, 2021, 4:11:07 PM7/2/21
to Hung dao quang, concordion
I've seen that type of behaviour 'Chrome is invoked but the url is "data:,"' and then hangs when:
- in a corporate environment (locked down)
- another version of Chrome is open a the same time

Are you able to try another browser type (e.g. Firefox >> FirefoxBrowserProvider), just to rule out a Chrome specific issue.



--
Jimmy Kemp
021 100 8381

Hung dao quang

unread,
Jul 2, 2021, 11:26:05 PM7/2/21
to Jimmy Kemp, concordion
Hi Jimmy,

 Tried with Firefox browser, but still got no luck. 

Vào Th 7, 3 thg 7, 2021 vào lúc 03:11 Jimmy Kemp <jimmy...@gmail.com> đã viết:

Hung dao quang

unread,
Jul 2, 2021, 11:33:04 PM7/2/21
to concordion
I think when instantiate the class SignUp, the method "pageIsLoaded" is called along with constructor, but at this time my loadingURL function has not reached, and got the timeOut issue

Fixture file 
```
 public void signUpWorkFlow(String fullName, String userName, String password, String confirmPassword) {
        SignUpWorkflow
                .invokeProcess(this)
                .callSignUpProcess(p -> {.  // line 1
                    p.goTo();  //line3
                    p.registerAccount(fullName, userName, password, confirmPassword);
                })
                .callSignInProcess(p -> {
                    p.signIn(userName, password);
                });
    }
```

Line1 on SignUpWorkflow is:
 ```
public  SignUpWorkflow callSignUpProcess(Consumer<SignUpPage> signUpPageConsumer){
        SignUpPage signUpPage = new SignUpPage(this.browserBasedTest); //line 2
        signUpPageConsumer.accept(signUpPage);
        return new SignUpWorkflow(this.browserBasedTest);
    }
```
At line 2, the constructor in class SignUpPage is called and the `pageIsLoaded` in this class is also invoked. However at this time, the p.goTo() in Fixture file (line3) is not reached.  

Reply all
Reply to author
Forward
0 new messages