Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 29 07:11

    asolntsev on gradle

    (compare)

  • Nov 29 07:11

    asolntsev on master

    Bump junitVersion from 5.8.1 to… (compare)

  • Nov 29 07:11
    asolntsev closed #1647
  • Nov 29 07:11
    asolntsev assigned #1647
  • Nov 29 07:02
    dependabot[bot] labeled #1647
  • Nov 29 07:02

    dependabot[bot] on gradle

    Bump junitVersion from 5.8.1 to… (compare)

  • Nov 29 07:02
    dependabot[bot] opened #1647
  • Nov 29 04:52
    plagov commented #1595
  • Nov 26 15:22
    asolntsev commented #1631
  • Nov 26 15:21
    asolntsev commented #1630
  • Nov 26 15:18
    asolntsev commented #1626
  • Nov 26 15:17
    asolntsev edited #1626
  • Nov 26 13:57
    sytnykma edited #1646
  • Nov 26 09:06
    sytnykma opened #1646
  • Nov 25 23:30
    asolntsev commented #1591
  • Nov 25 07:02
    dependabot[bot] labeled #1645
  • Nov 25 07:02

    dependabot[bot] on gradle

    Bump com.github.spotbugs from 4… (compare)

  • Nov 25 07:02
    dependabot[bot] opened #1645
  • Nov 24 21:24
    asolntsev labeled #1636
  • Nov 24 21:24
    asolntsev labeled #1636
AnatoliiHanziuk
@AnatoliiHanziuk
@asolntsev , I also tried InetAddress.getLocalHost().getHostAddress() but these options don't work. It could work if Selenoid is on the same machine where the tests are executed. And I have the case when the tests are executed in the docker container on CI (AWS CodePipeline) server and Selenoid instances are on the different machines (EC2 instances).
AnatoliiHanziuk
@AnatoliiHanziuk
Coz the tests are executed on the CI server, the Selenide proxy configuration is also defined there. Here it's needed to understand where the proxy is physically started. If it's started in the same place where the tests are running (inside of AWS CodePipeline) then the browser in Selenoid container started on a different EC2 machine needs somehow to have an access to the CodePipeline. Please correct me if I'm wrong in my flow of thoughts.
Boris Osipov
@BorisOsipov
everything is correct. proxy started where the tests are running. you should setup network\firewall\etc to make proxy accessible in browser in selenoid container.
Filip Křivský
@fkrivsky
Hi, is there a way to make $.should(condition) fail with a custom message?
Andrei Solntsev
@asolntsev
@fkrivsky sure: $().should(condition.because("it was deleted by previous unsuccessful login"))
Filip Křivský
@fkrivsky
Thanks!
jacker
@jackboy:matrix.org
[m]
cypress can be used to crawl websites (i think selenium can be used).
Blackwell174
@Blackwell174
Hey guys :) Wanted to report that with changes in 5.17 sentence $(element).waitUntil(disappears, time) is marked as deprecated but it does sound right since it has nothing to do with text :)
Andrei Solntsev
@asolntsev
Hi. I am not sure I've got your point.
Anyway, isn’t it simpler to always use the same api, like $(element).should(disappear, time)?
Victor Martinez
@victormartinezconte
Hi All, i'm trying to select an element with 'bytext' but the text inside has been uppercased via CSS (text-transform: uppercase;) so selenide is not able to find it. Is there anyway to make the search case insensitive? Thanks in advance!
Andrei Solntsev
@asolntsev
Hm... Good question.
I guess we don't have such method. But we can easily add it.
Method byText internally uses one complex xpath. It's possible to use functions like "to lower case" in this xpath.
Victor Martinez
@victormartinezconte
Hi @asolntsev , thanks for your response. It would be nice to have this feature.
Andrei Solntsev
@asolntsev
Could you please register a GitHub issue?
Andrei Solntsev
@asolntsev
@victormartinezconte I already added this issue: selenide/selenide#1380
Victor Martinez
@victormartinezconte
@asolntsev thanks for your support!
luke-lknet
@luke-lknet
Hi, are there any experiences in connection Selenide with Healenium and how to do it?
Andrei Solntsev
@asolntsev
Hi @luke-lknet .
I personally don’t have experience with Healenium,
but I know that its authors tried to integrate them, and didn’t succeed.
The main reason is that Selenide and Healenium has controversial goals. Selenide re-tries the same locator many times (up to 4 seconds), while Healenium tries to try different locators.
Andrei Solntsev
@asolntsev
BTW, we had an idea to implement similar mechanism inside of Selenide: selenide/selenide#129
Madhu Palagani
@MadhuPalagani_twitter
Hi Team,
please help me to add chrome browser extension
below is code snippet i tried
Configuration.browser = "chrome"
ChromeOptions options = new ChromeOptions()
options.addExtensions(new File("file path"))
Configuration.browserCapabilities = new DesiredCapabilities()
Configuration.browserCapabilities.setCapability(ChromeOptions.CAPABILITY, options)
open("https://www.google.com")
getting exception : org.openqa.selenium.WebDriverException: unknown error: cannot exclude load-extension switch when extensions are specified
Andrei Solntsev
@asolntsev
@MadhuPalagani_twitter what version If Selenide A
are you using?
Madhu Palagani
@MadhuPalagani_twitter
version - 5.14.0
Madhu Palagani
@MadhuPalagani_twitter
i tried with 5.17.2 selenide version. working fine.. tq
Blackwell174
@Blackwell174
Got feature idea "emulate css print media type" command so we wouldn't have to use AutoIT for that :) Helpful for doing print testing
Andrei Solntsev
@asolntsev
WOW, cool idea.
@Blackwell174 bit how to do it?
nestekon
@nestekon
Hi Team,
I have a question about dynamic locators as ElementsContainer constructors. Before latest releases I successfully used setSelf(). Now it is not clear how to resolve this structure:
public class Panel1 extends ElementsContainer {
    public Panel2 getPanel2(String title) {
        Panel2 panel2 = new Panel2();
        panel2.setSelf(getSelf().$x(".//*[text()='" + title + "']"));
        return panel2;
    }
}

public class Panel2 extends ElementsContainer {

}
Andrei Solntsev
@asolntsev
@nestekon Wow. I never understand why method setSelf is needed. And still don’t understand.
Classes extending EementsContainer (like Panel2) were not intended to instantiate manually. Instead, you should use method Page2 page = Selenide.page(Page2.class);.
You probably need something like this:
class Panel1 extends ElementsContainer {
  @FindBy(xpath = ".//*[text()='" + title + "']")
  Panel2 panel2;
}

class Panel2 extends ElementsContainer {
}
Or even better, don’t extend ElementsContainer at all. Especially if you don’t use @FindBy fields.
Just create plain old good java objects. Something like
class Panel1 {
  private final SelenideElement root = $(“.body”);
  private final Panel2 panel2 = new Panel2(root, ".//*[text()='" + title + "’]");
}

class Panel2 {
}
nestekon
@nestekon
@asolntsev Thanks for respond!
These examples seems static. The second example looks more suitable. Actually it is similar to my example where root is self, and in this way I will need some abstract class that will keep root.
Andrei Solntsev
@asolntsev
I don’t think you even need this abstract class. Why?
Let every class holds its own data.
nestekon
@nestekon
@asolntsev Every class that represent some container for elements will have root element and setter and getter for it. So it is better to keep this in some abstract class. And ElementsContainer was a good candidate for this. In anyway I want to know how it is intended to resolve the task of page.getPanel1().getPanel2(title); where title is not a constant, but is a test data.
Andrei Solntsev
@asolntsev
@nestekon can we discuss the design together tehing to find a better solution?
First If all, what If i ssy that getters/setters are not needed? You can remove them.
Andrei Solntsev
@asolntsev

Released Selenide 5.18.1: "Localhost is a delicate thing!”

https://selenide.org/2021/02/11/selenide-5.18.1/

nestekon
@nestekon
@asolntsev That's will be fine. And how will we init field of ElementsContainer type based on dynamic xpath?
In this case private final Panel2 panel2 = new Panel2(root, ".//*[text()='" + title + "’]") title can be only constant.
Andrei Solntsev
@asolntsev
It doesn't need to be a field. Create a method 'getPanel2()` instead.
nestekon
@nestekon
@asolntsev Yes. That's right. And to init Panel2we will need root element from parent container and setter or constructor to assign root element of Panel2
Nikolay Voronenko
@spluft_gitlab
Hi, everyone
Could you tell me how does element.shouldBe(enabled) work? I thought that it should check enabled/disabled attribute, but element hasn't it and this sample of code working good. I just want to understand that.
element:<div _ngcontent-spq-c121 class="steps-menu__item steps-menu__item_active ng-star-inserted">Text</div>
Also element could looks like:
<div _ngcontent-spq-c121 class="steps-menu__item ng-star-inserted">Text</div>
Andrei Solntsev
@asolntsev
@nestekon yes, pass root to Panel2 constructor. Simple, stable, readable. No magic, no annotations. Just works.
@spluft_gitlab what is the question? enabled means the absence of disabled attribute. You can just look into source code. It's an open-source project.
nestekon
@nestekon
@asolntsev Totally agree with that. So in our project we've decided to keep everything in this way. And for containers we've used Selenide's ElementsContainer as the super class. But now it turns out that this class is intended to be used only with annotation approach.
Andrei Solntsev
@asolntsev
Basically you can use ElementsContainer for any purpose, but I don't see a big point in it. Probably I am just missing something...
nestekon
@nestekon
@asolntsev Yes, that's not a big point in it. Just because in one of the latest releases setSelf()was deleted I wondered what are the alternative ways to init ElementsContainer