selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

Can you make Target input field longer? (display only)

Open luquitia opened this issue 8 years ago • 13 comments

Meta -

OS: Windows 10 Selenium IDE Version: 3.1.0 Selenium SIDE Runner Version: N/A Browser: Firefox (latest) Browser Version: 59.02

Expected vs. Actual Behavior:

Target input field in the IDE UI is the shortest displayed input field; I want it to be longer to show more characters at once (ideally 75+). --only about 58 characters can be displayed in this input field at one time (and I sometimes have strings of 75-125 characters that I need to fine-tune), as opposed to about 68 characters in the other input fields (Command, Value, Comment)

Note: I'm talking about display-only, not any change to the field's character limit (if there is one).

Steps to reproduce -

because of our complicated web application, I sometimes need to manually update the Target field for certain actions (like hover over a single-select dropdown list) which are not properly captured in Record (i.e., they don't play back) and the Xpath can be a long string, but it's very hard to see in the tiny box, especially if I'm using copy/paste and changing just one part of the xpath. Likewise for a long script command.

Some real examples (3 individual commands, unrelated):

Command: mouse over Target: //ul[@id='selectSecurityQuestion1-menu']/li[3]/div[@title='Where is your favorite vacation spot?']

Command: execute script Target: var k = new Date(); var month = new Array(); month[0] = "Jan"; month[1] = "Feb"; month[2] = "Mar"; month[3] = "Apr"; month[4] = "May"; month[5] = "Jun"; month[6] = "Jul"; month[7] = "Aug"; month[8] = "Sep"; month[9] = "Oct"; month[10] = "Nov"; month[11] = "Dec"; var m = month[k.getMonth()]; return m

Command: verify text Target: //ul[@class='educationList edu0 AddtoError']/li[5]/div/span Value: Diploma

Can you expand the Target input field to be full-width and/or move the "Select target in page" and "Search for target in page" icons so they're not shortening the viewable text area?

Obviously, this is not critical, but it is hopefully an easy thing to change for a future release. Thanks!

luquitia avatar Jul 05 '18 20:07 luquitia

The buttons are there because their action depends on the value of the target input, one changes it, the other uses it.
Moving them will make things unclear about how they work for users who aren't familiar with the functionality.
That being said I do understand the situation, I just think that moving the buttons isn't the right solution to the problem, if I come up with something I'll make sure to keep it up to date here.
In the mean time you can expand the IDE window by dragging it's sides, it will increase the size of the inputs.

corevo avatar Jul 08 '18 08:07 corevo

Hi, Tomer. I'm not advocating that we remove those buttons, just that you make the target field longer. One way to slightly increase the length is to "move" (not remove) those buttons to the left side, just after "Target" label (or below the label/input field); I understand they are context-sensitive. --that said, it's not required to move those buttons to address this problem; you could just expand the max length for this input field (preferably to 100% of available space, excluding margins and field label space).

I cannot reproduce the behavior you mention. No matter how big I make the IDE window, the Target field never shows more than 58 characters. All 4 input fields appear to have a small maximum fixed-length, maybe around 380-400px.
Note: I see same "fixed-width" behavior in both Firefox and Chrome IDE.

Thanks!

luquitia avatar Jul 09 '18 21:07 luquitia

What do you think about removing max-width of command-form? Old selenium had no max-width of target input too. I think it is not weird. image

Jongkeun avatar Jul 10 '18 00:07 Jongkeun

I like it! That would solve my issue... 👍

I guess a potential concern for some might be that the drop-down arrow for "Command" input field would be far to the right, but I'd be fine with it (especially since it has type-ahead logic) and anyone could shrink the IDE window to a smaller width, if desired.

luquitia avatar Jul 10 '18 00:07 luquitia

We don't need to click the arrow. If we want the command to set drop-down, we can click anywhere on the command input area.

But my concern point is the intention of @corevo. I don't think he set the max-width for nothing. Let's wait for his comment.

Jongkeun avatar Jul 10 '18 00:07 Jongkeun

OK, thanks. Yes, let's see what he says.

luquitia avatar Jul 10 '18 00:07 luquitia

The problem with unsetting the max-width is just that after a certain amount it gets ugly.
We need to strike a balance there, because not every thing put into the target is going to take advantage of an undefined length of input.
Although the size of the inputs can definitely increase, I don't believe increasing them indefinitely will solve the problem, especially when it comes to writing javascript in there.
My thinking is we can make the inputs sizes more lenient, but I'm trying to think of a better way to edit javascript in there, maybe change the editor, even with wider inputs, editing javascript in there is less than ideal.

corevo avatar Jul 11 '18 07:07 corevo

OK, thanks. Makes sense. Maybe for Target and Comments input fields, you use the "text area" style widget which has the corner icon that allows user to expand (height) on the fly? But I guess a user would also want to persist the new height as they switch between commands, which might get too complicated, coding-wise.
--in any case, if you could double the max-width (for all fields or any combination including Target), that would ameliorate my problem.

luquitia avatar Jul 11 '18 18:07 luquitia

Just put the buttons and pull down carets on the left instead of the right. That way, no matter how wide a user expands the window, it always looks and works fine.

kwmtang avatar Aug 20 '18 23:08 kwmtang

I was playing around with target becoming a textarea sort of input, I still don't have anything concrete, but I don't think increasing the width will solve it.
I'm thinking of completely changing the target input, into a component that acts according to the input that should go in it.

corevo avatar Aug 21 '18 06:08 corevo

Any update on this? Target field is still excessively small and hard to use with even medium length xpath values, like:

xpath=//a[@class='invalidFieldLink UnderLineLink']/span/../following-sibling::span[contains(.,'Required')]

--no matter how big I make the IDE window, the target input box remains at about 58 characters. I think extending or removing the MaxWidth attribute would solve this problem in short-term unless/until a more elegant solution is feasible. oct4-sel-ide-targetinputremainssmall--screenshot

luquitia avatar Oct 04 '18 16:10 luquitia

Done in v4

toddtarsi avatar Nov 14 '22 01:11 toddtarsi

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Dec 14 '22 21:12 github-actions[bot]