Skip to main content
added 1 character in body
Source Link
marc_s
  • 759.9k
  • 186
  • 1.4k
  • 1.5k

So, I was just creating a simple selenium/JBehave code when a question appeared. I'll

I'll first post the code simplified and then explain what is my question later.

@Component public class PageObjectSteps { private PageObject pageObject; @When("User wants to click on webElement1") public void accountToDeposit () { pageObject.waitPageLoad(); //Calling here just as an example pageObject.clickWebElement1(); } @When("User wants to type on webElement2 '$strType'") public void ammountToDepositamountToDeposit(@Named("strType") String strType) { pageObject.sendKeysWebElement2(strType); } } 

So, I was just creating a simple selenium/JBehave code when a question appeared. I'll first post the code simplified and then explain what is my question later.

@Component public class PageObjectSteps { private PageObject pageObject; @When("User wants to click on webElement1") public void accountToDeposit () { pageObject.waitPageLoad(); //Calling here just as an example pageObject.clickWebElement1(); } @When("User wants to type on webElement2 '$strType'") public void ammountToDeposit(@Named("strType") String strType) { pageObject.sendKeysWebElement2(strType); } } 

So, I was just creating a simple selenium/JBehave code when a question appeared.

I'll first post the code simplified and then explain what is my question later.

@Component public class PageObjectSteps { private PageObject pageObject; @When("User wants to click on webElement1") public void accountToDeposit () { pageObject.waitPageLoad(); //Calling here just as an example pageObject.clickWebElement1(); } @When("User wants to type on webElement2 '$strType'") public void amountToDeposit(@Named("strType") String strType) { pageObject.sendKeysWebElement2(strType); } } 
added 40 characters in body
Source Link
kivul
  • 1.2k
  • 13
  • 29

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used(again, WITHOUT calling it in the steps)? Or a notation that would make a method to be called everytime the page object is used?

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used? Or a notation that would make a method to be called everytime the page object is used?

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used(again, WITHOUT calling it in the steps)? Or a notation that would make a method to be called everytime the page object is used?

added 87 characters in body
Source Link
kivul
  • 1.2k
  • 13
  • 29

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used:? Or a notation that would make a method to be called everytime the page object is used?

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used:

Does selenium have something like: @AlwaysWait where I could use before a method and it would be called everytime the page object is used? Or a notation that would make a method to be called everytime the page object is used?

Source Link
kivul
  • 1.2k
  • 13
  • 29
Loading