-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Healenium - Selfhealing is not working with bySizzle library By bySizzle.css #148
Comments
Hi Team, Could you please guide us on this ? Thanks, |
Hi Team, Could you please guide us on this ? Thanks, |
Hello @swapnilshetes ! |
Hi @ElenaStepuro, Thank you for your reply and I request you if possible share with me some information on Locators which are identify by JavaScript. please check below example : HTML :: Enter Uname
and Locater identify by JavaScript in selenium : String selector = ".form-group:contains('Enter Username') > input"; So is this possible , can we heal this type of locater/element through this healing library. Thanks, |
Hello @swapnilshetes ! |
Hello thank you @ElenaStepuro to let us know. As per my observation we haven't provided provision for findbyElement by JavaScript. Please let us know any help because 40% (this % is approx. ) elements are identify by javascript because of this , this good idea will fail. If possible, please request you update us asap. Thanks, |
Hello @ElenaStepuro, Greetings of the day. Thanks. |
Hi Team, Greeting of the day,
I have implemented this feature and proper works with the docker , POM maven testng and in locater I am using findby/by to find the element e.g. " @findby(css="input#name") ". please check below details
##############################################################
//Web Elements by using Page Factory
@findby(css = "input#name")
public WebElement name;
@findby(css = "input#mobile")
public WebElement mobile;
@findby(css = "input#email")
public WebElement email;
@findby(css = "reasons")
public WebElement reasons;
@findby(css= "writeSomething")
public WebElement writeSomething;
@findby(css = "sub")
public WebElement sub;
#############################################################
Now I have updated FindBy/By with advance library using BySizzle e.g. " public By inputName() { return bySizzle.css("#name");}
##################################################################
BySizzle bySizzle = new BySizzle();
########################################################################
"while testing in normal mode without updated element in html it is working fine with healing is enabled and when I tried with updated element and healing is enabled. It is not working as expected. It is not doing healing not trying to healing such element ("#name") using bySizzle.css get noSuchElement error.
Could you please assist me on this. It will help us a lot to understand Selfhealing-healenium .
Thanks,
Swapnil
###############################################################################
@findby(xpath = "//div[@Class='contact-form']")
public class RegistrationPage extends BasePage {
BySizzle bySizzle = new BySizzle();
/*
@findby(css = "input#name")
public WebElement name;
@findby(css = "input#mobile")
public WebElement mobile;
@findby(css = "input#email")
public WebElement email;
@findby(css = "reasons")
public WebElement reasons;
@findby(css= "writeSomething")
public WebElement writeSomething;
@findby(css = "sub")
public WebElement sub;
*/
The text was updated successfully, but these errors were encountered: