Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 07:03
    petroOv-PDFfiller synchronize #1601
  • Oct 27 09:24
    asolntsev labeled #1626
  • Oct 27 09:24
    asolntsev labeled #1626
  • Oct 27 09:24
    asolntsev commented #1626
  • Oct 27 08:50
    dironel opened #1626
  • Oct 27 07:26
    petroOv-PDFfiller synchronize #1601
  • Oct 27 07:24

    asolntsev on v6.0.3

    (compare)

  • Oct 27 07:14

    asolntsev on master

    release Selenide 6.0.3 (compare)

  • Oct 27 07:12
    petroOv-PDFfiller synchronize #1601
  • Oct 27 07:12
    asolntsev milestoned #1625
  • Oct 27 07:11

    asolntsev on force-selenium-version

    (compare)

  • Oct 27 07:11

    asolntsev on master

    avoid using Selenium 3* transit… (compare)

  • Oct 27 07:11
    asolntsev closed #1625
  • Oct 27 06:23
    asolntsev labeled #1625
  • Oct 27 06:23
    asolntsev unassigned #1625
  • Oct 27 06:23
    asolntsev assigned #1625
  • Oct 27 06:23
    asolntsev review_requested #1625
  • Oct 27 06:23
    asolntsev opened #1625
  • Oct 27 06:23

    asolntsev on force-selenium-version

    avoid using Selenium 3* transit… (compare)

  • Oct 26 11:53
    asolntsev labeled #1624
Vladislav Voronin
@vrnvorona
Caused by: TimeoutException: at com.codeborne.selenide.ex.UIAssertionError.wrapToUIAssertionError(UIAssertionError.java:83) at com.codeborne.selenide.ex.UIAssertionError.wrapThrowable(UIAssertionError.java:74) at com.codeborne.selenide.ex.UIAssertionError.wrap(UIAssertionError.java:68) at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:90) at com.sun.proxy.$Proxy15.click(Unknown Source)
Andrei Solntsev
@asolntsev

Released Selenide 5.22.0:

Wake up, we have a release again!

https://selenide.org/2021/06/08/selenide-5.22.0/

Kristoffer
@krsg
Hi, I have a problem using source() with Firefox. The web page I'm testing contains some <!-- comments --> right beneath the closing html tag that I need. When using source() with Firefox those comments are missing. It works with Chrome. Does anybody know why they are missing?
Andrei Solntsev
@asolntsev
@krsg As far as I know it’s an expected behaviour. The whole point of comments is the ability to ignore them. Browsers do ignore them. source() can return html without the comments.
@krsg Why do you need to get comments? Usually it’s not needed.
Kristoffer
@krsg
Oh ok, other comments are shown though, but not these under the closing html tag
It's information about the current environment, so we use them to verify that we're in the right test environment and not in production
Andrei Solntsev
@asolntsev
I usually recommend to add such information in `<meta> tags in html.
For example, if you go to https://idemo.bspb.ru you will see build number and revision:
<html>
<head>
  <meta name="build" content="release-2021-03-30-small-stuff.64">
  <meta name="revision" content="ce2afaca56">
Or you can even add a separate URL for such information, like https://your.site.com/info
(It can be disabled in production if it’s not a public info)
Kristoffer
@krsg
Thanks! Sadly I think this is out of my control :-(
The solution works fine with Chrome. I just thought it would be nice to also run the tests with Firefox, that's when I stumbled upon the missing comments. But I think we will manage with just running Chrome.
Thanks for your help :-)
Andrei Solntsev
@asolntsev
Anyway, you can just execute a get request to get the html source. Like
```
String html = IOUtils.readUrlToString("https://your.site.com", UTF8);
Andrei Solntsev
@asolntsev
@krsg I hope this check is not a part of a functional test? It would be a wrong test design. End user might not see those comments and cannot use them. So your test shouldn't check it.
Andrei Solntsev
@asolntsev
It may be useful just as a double-check to be sure the right release was installed to the test environment. But then you don't need to check it in all browsers.
Vladislav Voronin
@vrnvorona

Hi. I have weird problem with Safari. It won't click, or will click only once and then will throw TimeoutException. Chrome/Firefox is perfect.

Nothing? :(

Andrei Solntsev
@asolntsev
@vrnvorona we haven't enough information to help you. There might be many reasons.
Vladislav Voronin
@vrnvorona
Alright, what kinda of info do i need to provide?
Andrei Solntsev
@asolntsev
Wait, I believe this question is not related to Selenide. It’s rather about Safari or Safaridriver.
Boris Osipov
@BorisOsipov
Yep as I know in some safari versions click doesn't work at all and workaround is click via actions
Sajan
@woodsongem
Hello All,
is it possible to take full page screenshot ?
Andrei Solntsev
@asolntsev
Ifaik "AShot" library can do it.
Sajan
@woodsongem
thanks a lot @asolntsev
Dai Pham Ngoc
@daipn-1859

@asolntsev Hello! I tried to pass basic authentication for my website on ie 11 with the code below

open(Configuration.baseUrl, "", "username", "password");

As the document guideline, the basic authen on ie should be supported, but I saw the action result on the screen.
We cannot input basic username/password and accept alert dialog on ie. Is this a bug from Selenide?
Thank you so much!

Andrei Solntsev
@asolntsev
I don't think it's a Selenide bug. Rather IE 11 doesn't support this feature.
1 reply
Andrei Solntsev
@asolntsev
I am not sure if there exists such a library.
I rather recommend to stop running tests in Internet Explorer. It's not supported anymore, even by Microsoft.
Dai Pham Ngoc
@daipn-1859
Yes. You're right and that makes sense. But my customer told me that 70% of the users of our product are using Internet Explorer.
This thing is very annoying to me :(
Thank you so much for your help!
Dai Pham Ngoc
@daipn-1859

@asolntsev Morning! If I want to set some preferences into firefox profile to disable "Download and open" dialog as

browser.helperApps.neverAsk.saveToDisk", "binary/octet-stream;...
browser.helperApps.neverAsk.openFile", "binary/octet-stream;...

How could I do it? Is there any way to add them into command lines as chromeoptions.args in Configuration?

By default, I don't see browser.helperApps.neverAsk.openFile preference in selenide code setupDownload...
Andrei Solntsev
@asolntsev
Hi @daipn-1859 !
Currently Selenide sets browser.helperApps.neverAsk.saveToDisk preference when creating FF webdriver.
I thought it should be enough to silently download any files without a dialog.
Dai Pham Ngoc
@daipn-1859

@asolntsev But the popular content types in property file does not contain binary/octet-stream. Otherwise, I'm using selenide 5.22.0 and run FF 89 to download as

$(".download-button").download(DownloadOptions.using(FileDownloadMode.FOLDER))

The open dialog is displayed after running the command above. That requires to select Save File > OK on dialog to complete the download process. Did I do wrong for anything? :(

Dai Pham Ngoc
@daipn-1859
Oh. binary/octet-stream is defined as application/octet-stream.
I think the problem come from the missing of browser.helperApps.neverAsk.openFile
Screenshot from 2021-06-18 13-57-29.png
Andrei Solntsev
@asolntsev
@daipn-1859 ok, we just need to add binary/octet-stream? It's easy.
Dai Pham Ngoc
@daipn-1859
@asolntsev Yes. I hope it works!
Andrei Solntsev
@asolntsev
@daipn-1859 Please try Selenide 5.22.1 with binary/octet-stream added (should appear in maven central in few minutes).
Dai Pham Ngoc
@daipn-1859
Thank you. I'll try it later asap when the maven central is ready
Andrei Solntsev
@asolntsev
It’s already in maven central.
2 replies
John Robinson
@torrlane
Hi, I'm trying to use the uploadFromClasspath method to upload a document. However, it's failing and I think that the issue is that the document is inside a jar file. Is this a supported usecase for Selenide?
Here's the error:
ERROR!
java.lang.IllegalArgumentException: URI is not hierarchical
at java.base/java.io.File.<init>(File.java:420)
at com.codeborne.selenide.commands.UploadFileFromClasspath.findFileInClasspath(UploadFileFromClasspath.java:44)
at com.codeborne.selenide.commands.UploadFileFromClasspath.execute(UploadFileFromClasspath.java:30)
at com.codeborne.selenide.commands.UploadFileFromClasspath.execute(UploadFileFromClasspath.java:19)
at com.codeborne.selenide.commands.Commands.execute(Commands.java:155)
at com.codeborne.selenide.impl.SelenideElementProxy.dispatchAndRetry(SelenideElementProxy.java:128)
at com.codeborne.selenide.impl.SelenideElementProxy.invoke(SelenideElementProxy.java:80)
at com.sun.proxy.$Proxy455.uploadFromClasspath(Unknown Source)
John Robinson
@torrlane
I've raised issue selenide/selenide#1493 for this. I hope that that's ok
Andrei Solntsev
@asolntsev
@torrlane Yes, sure, it’s absolutely ok. :)
It’s even better if you provide a pull request ;)
By the way, why do you need to use a file from jar? Don’t you have tests in src/test/java and resources (including files to be uploaded) in src/test/resources?
John Robinson
@torrlane
Thankyou for getting back to me Andrei - and making me think a bit deeper about the issue. In case anyone else is following this discussion, it's now moved to the ticket - selenide/selenide#1493
Sajan
@woodsongem
Hello All,
is it possible to pass custom video filename during savevideo? Currently I am getting the format below : PASSED-Test-20210629-171748.mp4. it would be nice to save on custom name