testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

Problem with border-radius and selectText [ie11, edge]

Open fmva opened this issue 8 years ago • 3 comments

What is your Test Scenario?

I have problem with ie11 and with edge browsers and selectText. If input has border-radius and I perform testcafe with assertion and selection timeout parameters then input will be selected only after assertion or selection timeout. I think it's wrong, because I would like to select text after typing it.

What is the Current behavior?

Text is selcted only after assertion or selection timeout

What is the Expected behavior?

I expect text is selected after typing it like as it works in chrome or ff browsers

What is your web application and your TestCafe test code?

I have test scenario test_select.js:

import { Selector } from 'testcafe';

fixture `Getting Started`
    .page `YOUR_DOMAIN/test_login.html`;

test('My first test 1', async t => {
    await t
        .typeText("#t1", 'test_test_test', { replace: true })
        .selectText("#t1");
});

And, I have page test_login.html

<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>test</title>
	
	<style>

	input {
	    border-radius: 3px;
	}
	</style>
</head>
<body>
    <input id="t1" type="text"/>
</body>
</html>

And I perform

testcafe ie test_select.js --selector-timeout 10000 --assertion-timeout 10000 or testcafe edge test_select.js --selector-timeout 10000 --assertion-timeout 10000

Your Environment details:

  • testcafe version: 0.22.0

  • node.js version: 8.9.1

  • command-line arguments:
    testcafe ie test_select.js --selector-timeout 10000 --assertion-timeout 10000 testcafe edge test_select.js --selector-timeout 10000 --assertion-timeout 10000

  • browser name and version: IE11 (11.0.9600.19155), Edge

  • platform and version: Windows7, Windows10

fmva avatar Oct 24 '18 04:10 fmva

Hi @fmva I have managed to replicate this behavior. Our team will research it and find a suitable solution if any.

VasilyStrelyaev avatar Oct 24 '18 10:10 VasilyStrelyaev

Hello, I noticed the same bug in Firefox 63.0, Ubuntu 18 - testcafe waits till timeout and after that selects text in input. Tested on testcafe @0.22.0 and @0.23.1. On Chrome it works ok.

Code to reproduce:

Test:

import { Selector } from 'testcafe';
fixture("My fixture")
    .page("http://localhost:3042/");

test('Select text within input', async t => {
    const input = Selector('#input');
    await t
        .selectText(input).pressKey('delete');

    await t
        .expect(await input.value).eql('')
});

Tested site:

<html>
	<input id="input" style="border-radius: 5px" value="test">
</html>

BartlomiejZalas avatar Nov 12 '18 15:11 BartlomiejZalas

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

lock[bot] avatar Mar 28 '19 00:03 lock[bot]